Add test for write.metadata.compression-codec property in Iceberg#13953
Conversation
53d4d2d to
fef36fa
Compare
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableProperties.java
Outdated
Show resolved
Hide resolved
fef36fa to
bac2472
Compare
|
|
Spark Iceberg is able to change on the fly the Notice in the snippet above that there are both Corresponding test scenario: Should we allow changing this property as well in |
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadataCompressionCodec.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableProperties.java
Outdated
Show resolved
Hide resolved
|
On the testing side, can we assert that the files are actually compressed? Also, there are a few property tests in |
|
Optional: We could add a |
I intentionally omitted it when the value is none. That is why
This is also intentionally disallowed to start with small feature (= we can support it when needed). |
bac2472 to
fda0c88
Compare
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergUtil.java
Outdated
Show resolved
Hide resolved
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Outdated
Show resolved
Hide resolved
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Outdated
Show resolved
Hide resolved
fda0c88 to
19afc40
Compare
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadataCompressionCodec.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadataCompressionCodec.java
Outdated
Show resolved
Hide resolved
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Under what circumstances a user would want to set this?
19afc40 to
096c979
Compare
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadataCompressionCodec.java
Outdated
Show resolved
Hide resolved
096c979 to
2427891
Compare
|
@findepi, I don't think that adding configuration for this is a good idea. This should be configured at the table level, not in processing engines. |
|
@rdblue sorry, I'm not sure exactly what you're suggesting. The code here is really just an alias for setting the Iceberg |
|
@alexjo2144, metadata files are typically handled within Iceberg, so I don't think Trino should need to do anything to make sure |
|
Trino doesn't have an arbitrary Unless you're saying users shouldn't be able to enable this property from Trino at all? |
This change doesn't add a configuration. |
|
@ebyhr, @alexjo2144, I didn't realize that there wasn't a way to set table configuration in Trino. I'm still not sure that the right option is to implement PRs like this for individual table properties. And, I'm a bit concerned about creating a custom name that doesn't match Iceberg. That just requires more documentation and fragments support across the ecosystem -- people won't be able to set Can you pass properties from |
Trino allows to set table properties that are declared by the connector.
Not currently. Trino table properties are strictly typed and so they need to be declared
There are two aspects of this
|
We always set it by default for new tables. I think this is mostly an administrator option and not something that should be exposed to users. Users probably don't know or care what to do with this setting. |
|
An administrator/operator is also a user from the Trino project perspective. |
|
@findepi, an administrator would set this for all tables in the catalog, not for individual tables. |
|
@rdblue What's the situation an administrator sets gzip compression for metadata file in the catalog? Also, your answer denies your past comment #13953 (comment)
|
|
@ebyhr, this is a table level setting because that's the granularity at which you can change it. We also don't expect users to interact with this. It is probably carried through from the catalog when a table gets created -- that's what we do. It's reasonable for an engine to allow changing table-level settings like this, but it isn't something that should be specific to an engine (with a special property that only works in Trino). |
|
@rdblue Thanks, I hope your will answer to this question "What's the situation an administrator sets gzip compression for metadata file in the catalog?" |
|
@ebyhr, this setting is most likely controlled by administrators that set table defaults. Users will probably never go into this level of detail. |
|
@rdblue I'm not asking who sets the property. My question was "When administrators want to use gzip for metadata compression globally"? e.g. estimated file size > n |
2427891 to
b37f1ee
Compare
write.metadata.compression-codec property in Icebergwrite.metadata.compression-codec property in Iceberg
Description
Add test for
write.metadata.compression-codecproperty in Iceberghttps://iceberg.apache.org/docs/latest/configuration/