Skip to content

Commit

Permalink
SNOW-1874368: Skip snowflake_cortex_sentiment doctest in gcp (#2830)
Browse files Browse the repository at this point in the history
<!---
Please answer these questions before creating your pull request. Thanks!
--->

1. Which Jira issue is this PR addressing? Make sure that there is an
accompanying issue to your PR.

   <!---
   In this section, please add a Snowflake Jira issue number.

Note that if a corresponding GitHub issue exists, you should still
include
   the Snowflake Jira issue number. For example, for GitHub issue
#1400, you should
   add "SNOW-1335071" here.
    --->

   Fixes SNOW-1874368 and failing daily precommit test.
Daily test result with no snowflake_cortex_sentiment failures:
https://github.com/snowflakedb/snowpark-python/actions/runs/12658208865/job/35274782725

2. Fill out the following pre-review checklist:

- [ ] I am adding a new automated test(s) to verify correctness of my
new code
- [ ] If this test skips Local Testing mode, I'm requesting review from
@snowflakedb/local-testing
   - [ ] I am adding new logging messages
   - [ ] I am adding a new telemetry message
   - [ ] I am adding new credentials
   - [ ] I am adding a new dependency
- [ ] If this is a new feature/behavior, I'm adding the Local Testing
parity changes.
- [x] I acknowledge that I have ensured my changes to be thread-safe.
Follow the link for more information: [Thread-safe Developer
Guidelines](https://github.com/snowflakedb/snowpark-python/blob/main/CONTRIBUTING.md#thread-safe-development)

3. Please describe how your code solves the related issue.

Fix for daily precommit test `snowflake_cortex_sentiment` doctest
failures (Snowpark python daily github action test)

---------

Signed-off-by: Labanya Mukhopadhyay <[email protected]>
Co-authored-by: Jamison Rose <[email protected]>
  • Loading branch information
sfc-gh-lmukhopadhyay and sfc-gh-jrose authored Jan 14, 2025
1 parent 80d722e commit 9d430e4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/snowflake/snowpark/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10509,13 +10509,6 @@ def snowflake_cortex_sentiment(text: ColumnOrLiteralStr):
Returns:
A floating-point number from -1 to 1 (inclusive) indicating the level of negative or positive sentiment in the
text. Values around 0 indicate neutral sentiment.
Example::
>>> content = "A very very bad review!"
>>> df = session.create_dataframe([[content]], schema=["content"])
>>> result = df.select(snowflake_cortex_sentiment(content)).collect()[0][0]
>>> assert -1 <= result <= 0
"""
sql_func_name = "snowflake.cortex.sentiment"
text_col = _to_col_if_lit(text, sql_func_name)
Expand Down

0 comments on commit 9d430e4

Please sign in to comment.