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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -1012,6 +1020,32 @@ public static Literal<?> parseIcebergLiteral(String 
value, org.apache.iceberg.ty
         }
     }
 
+    private static Literal<?> parseIcebergDateLiteral(
+            String value, Type dorisType, org.apache.iceberg.types.Type type) {
+        String canonicalValue = value;
+        if (dorisType != null) {
+            try {
+                canonicalValue = DateLiteralUtils.createDateLiteral(value, 
dorisType).getStringValue();

Review Comment:
   [P1] Convert unzoned TIMESTAMPTZ defaults from the session zone
   
   `DateLiteralUtils` does not apply the session timezone when a TIMESTAMPTZ 
string has no explicit offset, and `DateLiteral.getStringValue()` then appends 
`+00:00`. For example, with `time_zone = '+07:00'`, `ADD COLUMN ts TIMESTAMPTZ 
NULL DEFAULT '2020-01-01 00:00:00'` stores an Iceberg initial default of 
midnight UTC instead of the Doris instant `2019-12-31 17:00:00+00:00`. Doris' 
`TimestampTzLiteral.fromSessionTimeZone` is the path that implements the 
required unzoned-literal semantics; please use equivalent conversion here and 
add a non-UTC-session test.



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