Improve string reads from CSV files#5397
Open
e-kayrakli wants to merge 1 commit intoBears-R-Us:mainfrom
Open
Conversation
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Contributor
Author
|
This needs correctness testing. |
jabraham17
approved these changes
Feb 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5397 +/- ##
========================================
Coverage ? 100.00%
========================================
Files ? 5
Lines ? 115
Branches ? 0
========================================
Hits ? 115
Misses ? 0
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As part of switching to v2 benchmark suite, we observed that string reads from CSV files are extremely slow. While there are multiple reasons for it, this PR has the first wave of improvements.
.bytes()iterator in a new arrayreduceintents on an already existing forall instead of firing off anotherreduceexpression.bytes()capture and array assignment for copying the actual data. Instead, copies data byte by byte. We could probably considerCommunication.getto move the data even more efficiently if needed.A potential next step is to read all columns together instead of reading them column by column similar to recent improvements to Parquet reads.
Performance
The v1 benchmark uses 1M elements per locale. I tested with 10k, where this PR outperformed
mainby 107x. Any data size that is bigger is taking too long for me to wait.