-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Implement Iceberg OPTIMIZE #10497
Implement Iceberg OPTIMIZE #10497
Conversation
fdd6530
to
c817478
Compare
Just clarifying before I start reading this. This is specifically compaction of V1 tables which cannot contain positional or equality based delete markers? |
The SparkSQL procedure is called |
Yes, but only because the reader doesn't support positional or equality based delete markers today. Once reader has support for them, this should work with v2 tables.
Thanks for the pointer. "rewrite files" feels low-level description of what the operation does (today), and "optimize" describes (or hints at) the intent. |
Integration tests rarely interact with Hadoop FS directly, so `org.apache.hadoop.fs.Path` is uncommon. This allows to import `java.nio.file.Path`.
c817478
to
55599a0
Compare
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Show resolved
Hide resolved
newFiles.add(builder.build()); | ||
} | ||
|
||
if (scannedFiles.isEmpty() && newFiles.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert we should not ever get one empty and other not? Feels like a bug situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scanned file list may be non empty, but resulting data may be empty, if input files were empty.
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/procedure/IcebergOptimizeHandle.java
Outdated
Show resolved
Hide resolved
55599a0
to
410e4fb
Compare
CI #10583 |
No description provided.