Skip to content

SNOW-1830603 UDTFs for the decoder#2930

Merged
sfc-gh-vbudati merged 2 commits intovbudati/SNOW-1794510-merge-decoderfrom
vbudati/SNOW-1830603-udtfs
Jan 24, 2025
Merged

SNOW-1830603 UDTFs for the decoder#2930
sfc-gh-vbudati merged 2 commits intovbudati/SNOW-1794510-merge-decoderfrom
vbudati/SNOW-1830603-udtfs

Conversation

@sfc-gh-vbudati
Copy link
Contributor

@sfc-gh-vbudati sfc-gh-vbudati commented Jan 24, 2025

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

Fixes SNOW-1830603

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

  • Got UDTFs to work
  • changed the UDTF test (will prob go through another change in the future and will make a change to this test in main then).
  • got RelationalGroupedDataFrame to work
  • added a way to reset the recorded callables and their IDs

…ame to work, added a way to reset the recorded callables
@sfc-gh-vbudati sfc-gh-vbudati requested review from a team as code owners January 24, 2025 18:14
@sfc-gh-vbudati sfc-gh-vbudati requested review from sfc-gh-aalam, sfc-gh-aling and sfc-gh-jrose and removed request for a team January 24, 2025 18:14

df = session.create_dataframe([("SF", 21.0), ("SF", 17.5), ("SF", 24.0), ("NY", 30.9), ("NY", 33.6)], schema=["location", "temp_c"])

res10 = udtf("_ApplyInPandas", output_schema=PandasDataFrameType(StringType(), FloatType(), FloatType(), "LOCATION", "TEMP_C", "TEMP_F"), input_types=[StringType(), FloatType()], copy_grants=False, _registered_object_name="\"MOCK_DATABASE\".\"MOCK_SCHEMA\".SNOWPARK_TEMP_TABLE_FUNCTION_xxx")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The UDTF created here is not explicitly used anywhere in the user-written code, this is actually created in apply_in_pandas. I added _emit_ast=False to the call to udtf there, so this no longer exists in the generated AST.

@sfc-gh-vbudati sfc-gh-vbudati merged commit 461fd3c into vbudati/SNOW-1794510-merge-decoder Jan 24, 2025
31 of 48 checks passed
@sfc-gh-vbudati sfc-gh-vbudati deleted the vbudati/SNOW-1830603-udtfs branch January 24, 2025 21:02
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 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.

2 participants