github-actions[bot] commented on code in PR #65502:
URL: https://github.com/apache/doris/pull/65502#discussion_r3567567473


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -1182,10 +1183,17 @@ public static List<Column> parseSchema(Schema schema, 
boolean enableMappingVarbi
         List<Types.NestedField> columns = schema.columns();
         List<Column> resSchema = 
Lists.newArrayListWithCapacity(columns.size());
         for (Types.NestedField field : columns) {
+            String initialDefault = null;
+            if (field.initialDefault() != null) {
+                // Identity's human representation matches the strings Doris 
accepts for typed
+                // defaults, including date/timestamp values whose Iceberg 
Java representation is
+                // an integer or long rather than the displayed SQL value.
+                initialDefault = Transforms.identity(field.type())

Review Comment:
   This generic string default still is not type-safe for missing equality 
keys. It breaks at least two Iceberg types that the tests do not cover. For 
TIMESTAMP, `toHumanString()` produces ISO text such as `2024-01-01T00:00:00`, 
but the BE path later parses `initial_default_value` through 
`DataTypeDateTimeV2SerDe::from_fe_string()`, whose OLAP parser expects 
`YYYY-MM-DD HH:MM:SS[.ffffff]` and fills `MIN_DATETIME_V2` on parse failure, so 
matching deletes are missed. For UUID/BINARY/FIXED with 
`enable.mapping.varbinary=true`, the same path maps the field to Doris 
VARBINARY and calls `DataTypeVarbinarySerDe` through `from_fe_string()`, but 
that serde does not implement `from_olap_string()`, so `prepare_split()` fails 
instead of applying the logical initial default. Please make the 
initial-default carrier type-aware or normalize per Iceberg/Doris type before 
thrift, and add missing-key equality-delete coverage for timestamp and 
VARBINARY-mapped defaults.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to