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

Fix lnino/array_remove #2372

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

Fix lnino/array_remove #2372

wants to merge 42 commits into from

Conversation

sfc-gh-lninobrijaldo
Copy link
Contributor

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

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

    Fixes SIT-1755

  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.

    Cast the element parameter to VARIANT if it is a string to ensure correct handling by the array_remove function. This prevents type mismatch issues that could occur when the input is not already of the VARIANT type.

Copy link
Contributor

@sfc-gh-aalam sfc-gh-aalam left a comment

Choose a reason for hiding this comment

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

other changes look good. some of the changes are already covered in doctest so adding so many tests cases is not necessary but it doesn't hurt too much either :)

Comment on lines +2856 to +2862
expected = session.createDataFrame(
[
Row("[\n 1,\n 2,\n 3\n]"),
Row("[]"),
],
["data"],
)
Copy link
Contributor

Choose a reason for hiding this comment

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

not: creating a dataframe here (and other updates below) is not necessary

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.

2 participants