Skip to content

SNOW-2263127: Add AST support for AI functions #3761

Merged
sfc-gh-jdu merged 7 commits into
aifrom
ai-ast
Sep 12, 2025
Merged

SNOW-2263127: Add AST support for AI functions #3761
sfc-gh-jdu merged 7 commits into
aifrom
ai-ast

Conversation

@sfc-gh-jdu

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

    Fixes SNOW-2263127

  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.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

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

@sfc-gh-jdu sfc-gh-jdu requested review from a team as code owners September 10, 2025 19:13
@sfc-gh-jdu sfc-gh-jdu requested review from sfc-gh-mayliu, sfc-gh-yixie and sfc-gh-yuwang and removed request for a team September 10, 2025 19:13
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py Outdated
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/relational_grouped_dataframe.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
Comment thread src/snowflake/snowpark/dataframe_ai_functions.py
build_expr_from_python_val(ast.cols.args.add(), task_description)
# Set arguments
build_expr_from_python_val(ast.expr, expr)
ast.task_description = task_description

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we not need to capture **kwargs in the AST here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

it seems all methods in this class have kwargs but they are not captured in AST code. Maybe we can have a separate PR for it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, that's a good idea.

build_expr_from_python_val(ast.cols.args.add(), task_description)
# Set arguments
build_expr_from_python_val(ast.expr, expr)
ast.task_description = task_description

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, that's a good idea.

Comment thread tests/ast/data/DataFrame.ai.test Outdated
Comment thread src/snowflake/snowpark/relational_grouped_dataframe.py

@sfc-gh-heshah sfc-gh-heshah left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thank you!!

@sfc-gh-jdu sfc-gh-jdu merged this pull request into ai Sep 12, 2025
20 of 24 checks passed
@sfc-gh-jdu sfc-gh-jdu deleted the ai-ast branch September 12, 2025 00:20
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants