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 Parquet double reads to properly account for null values #3091

Merged
merged 4 commits into from
Apr 10, 2024

Conversation

bmcdonald3
Copy link
Contributor

In the Parquet taxi cab dataset, we were hitting end of stream errors when reading in null values and this was identified by Tess in #3087.

To fix this, we switch to reading in single values in the case where nulls are allowed so that we can check the definition level before inserting a value into the Parquet array.

Potential optimizations are an allow_nan flag to avoid the check and then, additionally, we could modify the previous implementation by reading the definition level and values into temporary vectors and then only assign the value if the value is non-null.

The reason it didnt' work before was that it was bsaed off of batchSize to loop over the values, but batch size doesn't actually guarantee how many values were read, due to row group intricacies.

Copy link
Member

@stress-tess stress-tess left a comment

Choose a reason for hiding this comment

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

Way simpler and fixes the bug I was seeing! Thanks for take care of this so quickly!

@stress-tess stress-tess enabled auto-merge April 9, 2024 22:20
@stress-tess stress-tess disabled auto-merge April 9, 2024 22:23
@stress-tess stress-tess added this pull request to the merge queue Apr 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 10, 2024
@stress-tess stress-tess added this pull request to the merge queue Apr 10, 2024
Merged via the queue into Bears-R-Us:master with commit f8b4f3c Apr 10, 2024
13 checks passed
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