-
Notifications
You must be signed in to change notification settings - Fork 928
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
Require batches to be non-empty in multi-batch JSON reader #17837
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7ea1fe5
rebase
shrshi 3927b1f
cleanup after review
shrshi 373b06d
simplifying the batch size logic
shrshi af8d052
removing unnecessary variables
shrshi b7a6533
fixing bad rebase
shrshi 0411031
Merge branch 'branch-25.02' into empty-table-bugfix
shrshi 7b2c64c
pre reviews
shrshi 67370cd
Merge branch 'branch-25.02' into empty-table-bugfix
shrshi 3e83d60
pre reviews
shrshi eaef278
Merge branch 'empty-table-bugfix' of github.com:shrshi/cudf into empt…
shrshi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double-checking here, we do actually want the limit to be explicitly tied to int32_t, right? i.e. we don't want the implementation-defined
size_t
size? Are we choosingint32_t
because it issize_type
? If so, should this becudf::size_type
in the arg tonumeric_limits
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we want to set
batch_limit
to be explicitly set to2^31 - 1
since that is the maximum string size accepted by the JSON tokenizer.cudf/cpp/src/io/json/nested_json_gpu.cu
Line 86 in acbcf45
If we are changing the arg to
numeric_limits
tocudf::size_type
, I think we should modifycheck_input_size
as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I don't know this part of the code well enough to know whether
int32_t
is really semanticallycudf::size_type
here or if it is a semantically different (but numerically equivalent) limit. I'll defer to your judgment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sematically, when do we prefer
cudf::size_type
overint32_t
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/rapidsai/cudf/blob/branch-25.04/cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md#cudfsize_type
If this is meant to represent one of those things above ^, it should be
cudf::size_type
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Bradley. I believe that the usage in the JSON batching logic and the tokenizer should be
int32_t
in that case since we are referring to the size of (and offsets in) a raw JSON string before the cudf table is constructed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that sounds right to me.