Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1690717 Applying Snowpark Python function (sin) #2415

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

sfc-gh-azhan
Copy link
Collaborator

@sfc-gh-azhan sfc-gh-azhan commented Oct 8, 2024

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

    SNOW-1690717

  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.
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

This is the first PR to support Snowpark Python functions in pandas apply. It only introduce sin as the first example.

@sfc-gh-azhan sfc-gh-azhan added the NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs label Oct 8, 2024
def is_supported_snowpark_python_function(func: AggFuncType) -> bool:
"""Return True if the `func` is a supported Snowpark Python function."""
func_module = inspect.getmodule(func)
if functions != func_module:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like checking the module is necessary if you are checking the function reference as well, but it probably doesn't hurt. Were you concerned about something in particular here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just use this to report NotImplementedError for those not in the supported list.

@sfc-gh-azhan sfc-gh-azhan merged commit ff16904 into main Oct 8, 2024
35 checks passed
@sfc-gh-azhan sfc-gh-azhan deleted the azhan-sin-1690717 branch October 8, 2024 20:37
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs snowpark-pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants