-
Notifications
You must be signed in to change notification settings - Fork 533
[#4755] improvement (trino-connector): Trino connector support the format table properties of Iceberg catalog #7612
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
Conversation
@@ -16,6 +16,8 @@ CREATE TABLE | |||
) | |||
COMMENT '' | |||
WITH ( | |||
format = 'PARQUET', | |||
format_version = '2', |
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.
Is the value of format_version
always '2'? What if Iceberg upgrade the format to 3
?
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.
After the upgrade, it would also be easy to replace this using a script.
@@ -110,6 +117,14 @@ public GravitinoTable createTable(ConnectorTableMetadata tableMetadata) { | |||
toGravitinoTableProperties( | |||
removeKeys(tableMetadata.getProperties(), ICEBERG_PROPERTIES_TO_REMOVE)); | |||
|
|||
if (propertyMap.containsKey(ICEBERG_FORMAT_PROPERTY)) { | |||
String format = propertyMap.get(ICEBERG_FORMAT_PROPERTY).toString(); | |||
properties.put(FORMAT, format); |
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.
I wonder if the value of PROVIDER
is always not null when the property format
is provided.
@diqiu50 |
...c/main/java/org/apache/gravitino/trino/connector/catalog/iceberg/IcebergMetadataAdapter.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/apache/gravitino/trino/connector/catalog/iceberg/IcebergMetadataAdapter.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/apache/gravitino/trino/connector/catalog/iceberg/IcebergMetadataAdapter.java
Show resolved
Hide resolved
LGTM except minor comments. |
@FANNG1 |
What changes were proposed in this pull request?
Trino connector support the format table properties of Iceberg catalog
Why are the changes needed?
Fix: #4755
Does this PR introduce any user-facing change?
No
How was this patch tested?
IT