-
Notifications
You must be signed in to change notification settings - Fork 986
Improve performance of reading int8/int16 Parquet data #7055
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
97418a7
allow for reading improperly encode UINT_8 and UINT_16 parquet data
etseidl 6ca4aad
add some benchmarks
etseidl 244e4b4
remove print
etseidl 75adc3d
checkpoint some experimental code
etseidl 01d6c13
Merge remote-tracking branch 'origin/main' into uint8_tests
etseidl cf713ac
Merge remote-tracking branch 'origin/main' into fix_uint_cast
etseidl 863e40f
Merge remote-tracking branch 'origin/main' into fix_uint_cast
etseidl 21c0bb0
Merge branch 'uint8_tests' into fix_uint_cast
etseidl 3d2b87f
checkpoint
etseidl 023f7bd
Merge remote-tracking branch 'origin/main' into fix_uint_cast
etseidl db0823a
add a few more types
etseidl 500a631
Merge remote-tracking branch 'origin/main' into fix_uint_cast
etseidl 1df021a
Merge branch 'fix_uint_cast' of github.com:etseidl/arrow-rs into fix_…
etseidl dd9e262
modify comment
etseidl 6f583c4
another edit
etseidl b7a9167
Merge remote-tracking branch 'apache/main' into fix_uint_cast
alamb 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 hidden or 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
Oops, something went wrong.
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.
are there other conversions that can avoid the type cast? i saw this being expensive in some other benchmarks 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 briefly looked at others and it wasn't super obvious
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.
what benchmark, btw? I am curious
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.
Several of the clickbench queries (not sure what data types, but it was spending like 20% of samples in casting during parquet reading).
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'll try to burrow down into that code again early next week and see if there are any other obvious candidates. I did try signed->unsigned for 32 and 64 bit ints and there was no difference.
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.
FWIW many of the clickbench columns are Int16, as I found when working on #7470.
I started running some benchmarks on a draft update to parquet in this PR (hopefully it will show some improvements)
55.1.0
datafusion#16012Uh oh!
There was an error while loading. Please reload this page.
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.
Ahh, the reason for this is that I32/64->U32/64 is handled above (around L171). I would think anything that falls through and relies on
arrow_cast::cast
is going to be potentially slow due to use ofunary_opt
, but a quick glance at the decimal code looks like it will figure out which casts are infallible and useunary
instead. Perhaps other conversions do a similar optimization.It might be worth exploring enumerating all of the allowed Parquet physical to logical type mappings and account for them here and not rely on
arrow_cast
machinery.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.