Skip to content

Commit 9d430e4

Browse files
SNOW-1874368: Skip snowflake_cortex_sentiment doctest in gcp (#2830)
<!--- 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]>
1 parent 80d722e commit 9d430e4

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/snowflake/snowpark/functions.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10509,13 +10509,6 @@ def snowflake_cortex_sentiment(text: ColumnOrLiteralStr):
1050910509
Returns:
1051010510
A floating-point number from -1 to 1 (inclusive) indicating the level of negative or positive sentiment in the
1051110511
text. Values around 0 indicate neutral sentiment.
10512-
10513-
Example::
10514-
10515-
>>> content = "A very very bad review!"
10516-
>>> df = session.create_dataframe([[content]], schema=["content"])
10517-
>>> result = df.select(snowflake_cortex_sentiment(content)).collect()[0][0]
10518-
>>> assert -1 <= result <= 0
1051910512
"""
1052010513
sql_func_name = "snowflake.cortex.sentiment"
1052110514
text_col = _to_col_if_lit(text, sql_func_name)

0 commit comments

Comments
 (0)