Gabriel39 commented on code in PR #68934:
URL: https://github.com/apache/doris/pull/68934#discussion_r4254435732


##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergTypeMapping.java:
##########
@@ -150,12 +150,16 @@ private static ConnectorType 
fromPrimitive(Type.PrimitiveType primitive,
                     return ConnectorType.of("TIMESTAMPTZ", 
ICEBERG_DATETIME_SCALE_MS, 0);
                 }
                 return ConnectorType.of("DATETIMEV2", 
ICEBERG_DATETIME_SCALE_MS, 0);
+            case TIMESTAMP_NANO:
+                // TIMESTAMP_NS is a wall-clock type; zoned nanoseconds need a 
distinct carrier.
+                return ConnectorType.of(((Types.TimestampNanoType) 
primitive).shouldAdjustToUTC()
+                        ? "UNSUPPORTED" : "TIMESTAMP_NS");

Review Comment:
   Reworked the promotion policy into a dedicated `format::EvolutionCast` 
expression. Ordinary `Cast` no longer has an `is_schema_evolution` flag or an 
external-format validation branch. `EvolutionCast` reuses the existing checked 
conversion and owns the DATEV2-to-TIMESTAMP_NS strict policy; the 
execution-layer CAST functions and ordinary SQL CAST semantics are unchanged.
   
   Projection, localized filters, table materialization, and 
equality-delete/default conversions now create `EvolutionCast`. Both 
expression-tree cloning and runtime-context cloning preserve the check.
   
   Local validation: 384 BE tests passed, including seven focused expression 
tests and retained Parquet DATE files with scalar/nested projections and 
localized filtering. The tests cover both strict-cast settings, range 
boundaries, NULLs, constant folding, empty input, numeric promotion, and 
cloning.



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