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 write_json to handle empty string column #16995

Conversation

karthikeyann
Copy link
Contributor

@karthikeyann karthikeyann commented Oct 3, 2024

Description

Add empty string column condition for write_json
bypass make_strings_children for empty column because when grid size is zero, it throws cuda error.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

bypass make_strings_children for empty column because when grid size is zero, it throws cuda error.
@karthikeyann karthikeyann added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. cuIO cuIO issue non-breaking Non-breaking change labels Oct 3, 2024
@karthikeyann karthikeyann self-assigned this Oct 3, 2024
@karthikeyann karthikeyann requested a review from a team as a code owner October 3, 2024 22:09
Copy link
Member

@mhaseeb123 mhaseeb123 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. Should we add tests for this case as well as empty columns for other types?

@karthikeyann
Copy link
Contributor Author

unit test added.

@karthikeyann
Copy link
Contributor Author

Should we add tests for this case as well as empty columns for other types?

Not required. All other types use string functions which checks for empty inputs. Only custom function created in this file get_escaped_strings did not handle empty string column input. I added string, int empty column also to this unit test.

Copy link
Contributor

@davidwendt davidwendt left a comment

Choose a reason for hiding this comment

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

Nit on braces

@karthikeyann
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit fcff2b6 into rapidsai:branch-24.12 Oct 5, 2024
100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants