Skip to content

Add API changes for statistics information in table metadata - #5021

Merged
rdblue merged 1 commit into
apache:masterfrom
findepi:findepi/stats-in-table-just-api
Aug 30, 2022
Merged

rdblue merged 1 commit into
apache:masterfrom
findepi:findepi/stats-in-table-just-api

Conversation

@findepi

@findepi findepi commented Jun 13, 2022

Copy link
Copy Markdown
Member

API for #4945
Implementation PR: #4741

Extracted from #4741 per #4741 (comment)

@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch from a593574 to b37e321 Compare June 14, 2022 08:04
@findepi

findepi commented Jun 14, 2022

Copy link
Copy Markdown
Member Author

@rdblue thank you for your review. Updated accordingly.

@findepi
findepi requested a review from rdblue June 14, 2022 08:06

@Override
public UpdateTableStatistics updateTableStatistics() {
throw new UnsupportedOperationException("Cannot update statistics of a metadata table");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you add this as a default implementation rather than adding it in this class? That way, if anyone is using the interface it doesn't break them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure, added default method and removed impl stubs from BaseTable and BaseTransaction.
Impl in BaseMetadataTable stays because it includes "a metadata table" in the exc msg (consistently with all other methods in this class).

@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch from b37e321 to 74bd319 Compare June 20, 2022 07:52
@findepi
findepi requested a review from rdblue June 20, 2022 07:56
@findepi

findepi commented Jun 20, 2022

Copy link
Copy Markdown
Member Author

Currently, based on #4978

@github-actions github-actions Bot added the build label Jun 20, 2022
@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch 2 times, most recently from 9791c86 to 92e88c4 Compare June 22, 2022 19:44
@findepi

findepi commented Jun 22, 2022

Copy link
Copy Markdown
Member Author

@rdblue updated this to have one stats file for a table.

@findepi

findepi commented Jun 24, 2022

Copy link
Copy Markdown
Member Author

Per offline ask from @rdblue , I extracted prep change here: #5129

@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch from f5e3f8f to 3c1e5c6 Compare June 27, 2022 13:19
@findepi findepi changed the title Add API changes for statistics information in table snapshot Add API changes for statistics information in table metadata Aug 1, 2022
@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch 3 times, most recently from 42b0dfa to 0f451b8 Compare August 1, 2022 15:51
@findepi

findepi commented Aug 1, 2022

Copy link
Copy Markdown
Member Author

Updated after merge of #4945.

@rdblue can you please take a look?

@findepi
findepi removed the request for review from rdblue August 1, 2022 15:54
@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch 2 times, most recently from 22d6e91 to b899566 Compare August 5, 2022 18:25
@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch from b899566 to 07418e2 Compare August 5, 2022 18:28
@findepi

findepi commented Aug 5, 2022

Copy link
Copy Markdown
Member Author

@rdblue thank you for a careful review. Comments applied, the code is much better now.
The potentially immature changes to TableMetadata are moved to #5450

Can you please take another look?

@findepi
findepi requested a review from rdblue August 5, 2022 18:29
@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch from 07418e2 to 0c9eb05 Compare August 8, 2022 09:50
@findepi

findepi commented Aug 8, 2022

Copy link
Copy Markdown
Member Author

Updated to apply #5450 (comment).

@findepi

findepi commented Aug 9, 2022

Copy link
Copy Markdown
Member Author

Build failure

> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.palantir.baseline:gradle-baseline-java:4.0.0.
     Required by:
         project :
      > Could not resolve com.palantir.baseline:gradle-baseline-java:4.0.0.
         > Could not get resource 'https://plugins.gradle.org/m2/com/palantir/baseline/gradle-baseline-java/4.0.0/gradle-baseline-java-4.0.0.pom'.
            > Could not GET 'https://plugins.gradle.org/m2/com/palantir/baseline/gradle-baseline-java/4.0.0/gradle-baseline-java-4.0.0.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.4.2/userguide/build_environment.html#gradle_system_properties
                  > Received fatal alert: handshake_failure

looks unrelated.

Let me push amended commit to restart the build.

@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch 2 times, most recently from 1bba34e to 21f012f Compare August 11, 2022 13:33
@findepi

findepi commented Aug 23, 2022

Copy link
Copy Markdown
Member Author

Currently, depends on #5450

@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch from 21f012f to 20d6c0d Compare August 25, 2022 11:20
@findepi

findepi commented Aug 25, 2022

Copy link
Copy Markdown
Member Author

Currently, depends on #5450

rebased after that one is merged.

@rdblue please take a look

@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch 2 times, most recently from 3f50ce0 to 1c66ccb Compare August 25, 2022 19:54
*
* @return this for method chaining
*/
UpdateStatistics setStatisticsFile(long snapshotId, @Nullable StatisticsFile statisticsFile);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you remove the @Nullable annotation?

How about naming this setStatistics like in TableMetadata.Builder?

Also, I thought we needed a removeStatistics method as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

@rdblue

rdblue commented Aug 26, 2022

Copy link
Copy Markdown
Contributor

@findepi, this is looking close. I think we just need to finalize the UpdateStatistics methods. Do you have a PR for the UpdateStatistics implementation? We should be able to work on that in parallel.

@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch 2 times, most recently from 91d98c6 to 6d5c136 Compare August 27, 2022 21:24
@findepi

findepi commented Aug 27, 2022

Copy link
Copy Markdown
Member Author

I have applied the requested changes. @rdblue please take another look

@findepi
findepi force-pushed the findepi/stats-in-table-just-api branch from 6d5c136 to 81706c8 Compare August 29, 2022 15:01
@rdblue
rdblue merged commit cc7e6d9 into apache:master Aug 30, 2022
@findepi
findepi deleted the findepi/stats-in-table-just-api branch August 30, 2022 17:37
@findepi

findepi commented Aug 30, 2022

Copy link
Copy Markdown
Member Author

Thank you for the merge!

zhongyujiang pushed a commit to zhongyujiang/iceberg that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants