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

[SIT-2372] map function #2378

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-lfallasavendano
Copy link

@sfc-gh-lfallasavendano sfc-gh-lfallasavendano commented Sep 30, 2024

Adds the map function to apply a Python function to each row of a DataFrame.

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

    Fixes SIT-2372

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

    Adds the map function which applies a Python function to every row of a DataFrame.

Copy link

Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing

1 similar comment
Copy link

github-actions bot commented Oct 1, 2024

Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing

Copy link

github-actions bot commented Oct 1, 2024

Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing

@sfc-gh-lfallasavendano sfc-gh-lfallasavendano requested a review from a team October 1, 2024 15:06
Copy link

@sfc-gh-mvega sfc-gh-mvega left a comment

Choose a reason for hiding this comment

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

looks good to me... again.
the new approach of making mpa part of functions.py does not alter to much the original implementation.

src/snowflake/snowpark/functions.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/functions.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/functions.py Show resolved Hide resolved
src/snowflake/snowpark/functions.py Show resolved Hide resolved
src/snowflake/snowpark/functions.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/functions.py Outdated Show resolved Hide resolved
@sfc-gh-lfallasavendano sfc-gh-lfallasavendano force-pushed the lfallasavendano-SIT-2372-map-function branch from e88eed7 to d0b5377 Compare October 2, 2024 17:53
src/snowflake/snowpark/functions.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/functions.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/functions.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/functions.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/functions.py Show resolved Hide resolved
src/snowflake/snowpark/functions.py Show resolved Hide resolved
@sfc-gh-lfallasavendano sfc-gh-lfallasavendano force-pushed the lfallasavendano-SIT-2372-map-function branch 2 times, most recently from 807f352 to ff6a853 Compare October 9, 2024 14:33
]

output_cols = [
col(f"${i + num_fields + 1}").alias(col_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
col(f"${i + num_fields + 1}").alias(col_name)
col(f"${i + num_fields + 1}").alias(col_name) # this is done to avoid collision with original table columns

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in the commit fbeaf06

@sfc-gh-lfallasavendano sfc-gh-lfallasavendano force-pushed the lfallasavendano-SIT-2372-map-function branch 4 times, most recently from f09f598 to d66de96 Compare October 18, 2024 13:59
@sfc-gh-fgonzalezmendez sfc-gh-fgonzalezmendez force-pushed the lfallasavendano-SIT-2372-map-function branch 4 times, most recently from 07e0771 to e7b90ad Compare October 21, 2024 20:22
@sfc-gh-fgonzalezmendez sfc-gh-fgonzalezmendez force-pushed the lfallasavendano-SIT-2372-map-function branch 4 times, most recently from 66bbfa5 to 01bc7f3 Compare October 22, 2024 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants