roryqi commented on code in PR #11957:
URL: https://github.com/apache/gravitino/pull/11957#discussion_r3549259648
##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergTablePropertiesMetadata.java:
##########
@@ -42,6 +45,22 @@ public class IcebergTablePropertiesMetadata extends
BasePropertiesMetadata {
public static final String FORMAT_VERSION = IcebergConstants.FORMAT_VERSION;
public static final String DISTRIBUTION_MODE =
TableProperties.WRITE_DISTRIBUTION_MODE;
+ /**
+ * The default Iceberg table format version Gravitino applies when {@link
#FORMAT_VERSION} is not
+ * explicitly set. Gravitino owns this default rather than deferring to the
Iceberg library's own
+ * version-dependent default, and stamps it onto the table at creation.
+ */
+ public static final int ICEBERG_DEFAULT_FORMAT_VERSION = 2;
+
+ /**
+ * The explicit Iceberg table format versions Gravitino accepts for {@link
#FORMAT_VERSION}. An
+ * unset (empty) value is also allowed and defaults to {@link
#ICEBERG_DEFAULT_FORMAT_VERSION}.
+ * Version 3 is required for V3 types such as {@code variant}; extend this
set as Gravitino adopts
+ * newer Iceberg writer versions. Note this is a Gravitino policy: Iceberg
1.11.0 itself supports
+ * up to format version 4.
+ */
+ public static final Set<Integer> SUPPORTED_FORMAT_VERSIONS =
ImmutableSet.of(2, 3);
Review Comment:
Why don't we support version 1? Could we create a v1 table by Iceberg REST
API?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]