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

Prevent multiple files per partition in TestMetadataQueryOptimization #15524

Merged
merged 1 commit into from
Dec 26, 2022

Conversation

sopel39
Copy link
Member

@sopel39 sopel39 commented Dec 24, 2022

optimize_metadata_queries doesn't work when files are written by different writers

Fixes #15507

@sopel39
Copy link
Member Author

sopel39 commented Dec 24, 2022

Scaling shouldn't happen here as CTAS is very small

                "CREATE TABLE %s (a, b, c) WITH (PARTITIONING = ARRAY['b', 'c']) AS VALUES (5, 6, 7), (8, 9, 10)",

locally this test passes without scaling (and scaling should never trigger because exchange buffer is much bigger than 6 rows)

@sopel39 sopel39 marked this pull request as draft December 24, 2022 07:22
@sopel39 sopel39 marked this pull request as ready for review December 24, 2022 07:45
@sopel39
Copy link
Member Author

sopel39 commented Dec 24, 2022

Managed to repro with 2 writers, it seems that optimize_metadata_queries doesn't work when files are written by different writers

@sopel39
Copy link
Member Author

sopel39 commented Dec 24, 2022

Adjuster PR

optimize_metadata_queries doesn't work when files are written by different writers
@sopel39 sopel39 merged commit 84b7bf2 into trinodb:master Dec 26, 2022
@sopel39 sopel39 deleted the ks/prevent branch December 26, 2022 20:00
@github-actions github-actions bot added this to the 404 milestone Dec 26, 2022
@findepi
Copy link
Member

findepi commented Dec 27, 2022

Thanks for fixing the failing test!

optimize_metadata_queries doesn't work when files are written by different writers

this sounds like a product bug, while fix looks like test-only change.
what am i missing?

@sopel39
Copy link
Member Author

sopel39 commented Dec 27, 2022

this sounds like a product bug, while fix looks like test-only change.
what am i missing?

I don't know Iceberg internals. For me it's odd that this optimization stops working when partitions are written by different writers. I'm leaving it to you @findepi to triage it. My goal here was to restore previous behavior in test and unblock master.

@findepi
Copy link
Member

findepi commented Dec 28, 2022

My goal here was to restore previous behavior in test and unblock master.

yes, and that's appreciated!

For me it's odd that this optimization stops working when partitions are written by different writers

sounds odd, indeed
which issue tracks this?

@sopel39
Copy link
Member Author

sopel39 commented Dec 28, 2022

which issue tracks this?

none. Again, I'm not sure if its a bug, therefore I defer to more Iceberg experienced person for triaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Flaky TestMetadataQueryOptimization.testOptimization
3 participants