lasdf1234 commented on code in PR #14659:
URL: https://github.com/apache/gravitino/pull/14659#discussion_r4492960552


##########
api/src/main/java/org/apache/gravitino/rel/Column.java:
##########
@@ -78,10 +84,29 @@ public interface Column {
   boolean autoIncrement();
 
   /**
+   * Returns the write-time default value of this column.
+   *
+   * <p>For Iceberg format-version 3, this corresponds to {@code 
write-default}: the value writers
+   * fill in when a field is not supplied.
+   *
    * @return The default value of this column, {@link 
Column#DEFAULT_VALUE_NOT_SET} if not specified
    */
   Expression defaultValue();
 
+  /**
+   * Returns the initial default value of this column.
+   *
+   * <p>For Iceberg format-version 3, this corresponds to {@code 
initial-default}: the value assumed
+   * for rows written before the field was added. Catalogs that do not 
distinguish an initial
+   * default may leave this unset.

Review Comment:
   Updated on `694248108`: `defaultValue()` / `initialDefaultValue()` Javadoc 
now leads with provider-neutral semantics, keeps unset behavior explicit, and 
presents the Iceberg v3 mappings as examples.



##########
docs/open-api/tables.yaml:
##########
@@ -390,6 +390,13 @@ components:
           default: true
         defaultValue:
           $ref: "#/components/schemas/ColumnDefaultValue"
+        initialDefaultValue:
+          allOf:
+            - $ref: "#/components/schemas/ColumnDefaultValue"
+          description: >
+            The initial default value of the column. For Iceberg 
format-version 3,
+            this maps to initial-default (assumed for rows written before the 
field
+            was added). defaultValue maps to write-default.

Review Comment:
   Updated on `694248108`: `docs/tables-and-views.md` now documents both 
meanings, unset/unsupported behavior, and the read-only restriction for 
`initialDefaultValue`; OpenAPI `Column` descriptions are aligned with the same 
generic semantics (Iceberg as examples).



-- 
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]

Reply via email to