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

Closes #2015 - Efficient NaN read from Parquet #2351

Merged

Conversation

Ethan-DeBandi99
Copy link
Contributor

Closes #2015

Previously Parquet read workflows for float and double types were updated to allow reading of NaN values. This update only read value by value, which is not the most efficient. This PR updates these workflows to read in batches and identify the NaN values using the definition level and a temporary array. Because we are able to read the data in chunks and then process/set the return, performance is improved. It is also worth noting that List columns (used for SegArrays) do not require a check of the Definition Level to set NaN values.

The example runtimes below were run on a single locale with a DataFrame containing 2 columns, one with all NaN values and one with some NaN values. The DataFrame contained 10**8 rows.

Before this PR

Runtime: 4.234747886657715

After this PR

Runtime: 1.29227876663208

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.

Looks good!

@stress-tess stress-tess added this pull request to the merge queue Apr 5, 2023
Merged via the queue into Bears-R-Us:master with commit 02a9ca1 Apr 5, 2023
@Ethan-DeBandi99 Ethan-DeBandi99 deleted the 2015_efficient_nan_read_pq branch April 7, 2023 15:40
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.

Parquet Read NaN Efficiently
2 participants