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

Avoid re-reading parquet footer for iceberg stats in writer #19090

Merged
merged 4 commits into from
Sep 21, 2023

Conversation

raunaqmorarka
Copy link
Member

@raunaqmorarka raunaqmorarka commented Sep 19, 2023

Description

Currently we're reading parquet file footer back just after
writing it to file system for computing iceberg stats.
Since Trino parquet writer already has the file footer, there
is no need to perform an extra IO to get the footer again.

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# Iceberg
* Improve performance of writing parquet files. ({issue}`19090`)

}

@Override
public Metrics getMetrics()
{
return fileMetrics(inputFile, metricsConfig);
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a test for your improvement in io.trino.plugin.iceberg.TestIcebergMetadataFileOperations

Copy link
Member Author

Choose a reason for hiding this comment

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

TestIcebergMetadataFileOperations seems to be specifically about metadata operations, this is a "DATA" operation.
There is code preventing assertions on DATA operations at

Copy link
Member

Choose a reason for hiding this comment

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

you're right. we can either broaden the test class coverage (rename class to match data operations too)
or add similar class, a copy
or abstain from testing

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm skipping testing access count explicitly for now

Currently we're reading parquet file footer back just after
writing it to file system for computing iceberg stats.
Since Trino parquet writer already has the file footer, there
is no need to perform an extra IO to get the footer again.
@raunaqmorarka raunaqmorarka merged commit 8b2c3be into trinodb:master Sep 21, 2023
60 checks passed
@raunaqmorarka raunaqmorarka deleted the ice-writer-footer branch September 21, 2023 17:09
@github-actions github-actions bot added this to the 427 milestone Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed hive Hive connector iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

5 participants