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

Reduce colreaders #8248

Merged
merged 6 commits into from
Jul 17, 2023
Merged

Reduce colreaders #8248

merged 6 commits into from
Jul 17, 2023

Conversation

ccfelius
Copy link
Contributor

The ReadStatistics call was creating a root_reader for every column, now we do this only once at initialization.
This reduces the number of creations by the amount of columns (PropagateStatistics does this for all columns)

Copy link
Collaborator

@Mytherin Mytherin left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Looks good to me. One minor comment:

@@ -399,7 +399,6 @@ void ParquetReader::InitializeSchema() {
if (file_meta_data->schema.size() < 2) {
throw FormatException("Need at least one non-root column in the file");
}
auto root_reader = CreateReader();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this not stay in the InitializeSchema? It seems like we are initializing the root_reader only right before calling InitializeSchema anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right, moved it to InitializeSchema(). Thanks!

@github-actions github-actions bot marked this pull request as draft July 14, 2023 14:03
@Mytherin Mytherin marked this pull request as ready for review July 14, 2023 18:47
@Mytherin Mytherin merged commit a673a7e into duckdb:master Jul 17, 2023
53 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

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.

None yet

2 participants