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-1819523: Add support for expand=True in Series.str.split #2832

Merged
merged 7 commits into from
Jan 15, 2025

Conversation

sfc-gh-helmeleegy
Copy link
Contributor

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

    Fixes SNOW-1819523

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

    Add support for expand=True in Series.str.split.

Copy link
Contributor

@sfc-gh-lmukhopadhyay sfc-gh-lmukhopadhyay left a comment

Choose a reason for hiding this comment

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

LGTM, just had a couple questions!

@@ -16842,6 +16839,12 @@ def output_col(
if np.isnan(n):
# Follow pandas behavior
return pandas_lit(np.nan)
elif n < -1 and not pandas.isnull(pat) and len(str(pat)) > 1:
# Follow pandas behavior, which seems to leave the input column as is
Copy link
Contributor

@sfc-gh-jjiao sfc-gh-jjiao Jan 14, 2025

Choose a reason for hiding this comment

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

nit: why seems to, I thought we should be sure it is or not; are we saying this is not 100% sure? 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's because this behavior is not documented by pandas. So it's just based on our experiments and observations (which are not / cannot be exhaustive). I updated the wording of the comment a little bit though.

@sfc-gh-helmeleegy sfc-gh-helmeleegy enabled auto-merge (squash) January 15, 2025 01:10
@sfc-gh-helmeleegy sfc-gh-helmeleegy merged commit d9801ba into main Jan 15, 2025
50 of 52 checks passed
@sfc-gh-helmeleegy sfc-gh-helmeleegy deleted the helmeleegy-SNOW-1819523 branch January 15, 2025 02:05
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants