Skip to content

Fix Iceberg statistics for empty table#12316

Merged
findepi merged 5 commits intotrinodb:masterfrom
findepi:findepi/iceberg-stats-empty-table
May 11, 2022
Merged

Fix Iceberg statistics for empty table#12316
findepi merged 5 commits intotrinodb:masterfrom
findepi:findepi/iceberg-stats-empty-table

Conversation

@findepi
Copy link
Copy Markdown
Member

@findepi findepi commented May 10, 2022

Return correct table statistics when an Iceberg table is empty.

@cla-bot cla-bot bot added the cla-signed label May 10, 2022
@findepi findepi mentioned this pull request May 10, 2022
@findepi findepi force-pushed the findepi/iceberg-stats-empty-table branch from b3ddece to c8f8d10 Compare May 10, 2022 12:53
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: a constant for TableStatistics.builder() .setRowCount(Estimate.of(0)) .build();?

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.

i would call it "empty_table_statisics" but then it would look the same as TableStatistics.empty();
maybe we should rename TableStatistics.empty() in a follow-up?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah - it makes sense

Copy link
Copy Markdown
Member

@hashhar hashhar 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 to me.

@findepi findepi force-pushed the findepi/iceberg-stats-empty-table branch from c8f8d10 to 7ed8b01 Compare May 11, 2022 07:31
@findepi
Copy link
Copy Markdown
Member Author

findepi commented May 11, 2022

(just rebased)

findepi added 5 commits May 11, 2022 09:40
This is counterpart of an already public `nativeValueToBlock`.
`computeActual` and asserting equality with `MaterializedResult` is less
handy.
@findepi findepi force-pushed the findepi/iceberg-stats-empty-table branch from 7ed8b01 to 7381fa2 Compare May 11, 2022 07:42
@findepi
Copy link
Copy Markdown
Member Author

findepi commented May 11, 2022

Dropped Remove redundant pattern flexibility for access denied message commit and fixed a test.

@findepi findepi merged commit 998bdc3 into trinodb:master May 11, 2022
@findepi findepi deleted the findepi/iceberg-stats-empty-table branch May 11, 2022 10:58
@findepi findepi added the no-release-notes This pull request does not require release notes entry label May 11, 2022
@github-actions github-actions bot added this to the 381 milestone May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed no-release-notes This pull request does not require release notes entry

Development

Successfully merging this pull request may close these issues.

5 participants