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


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionKey.java:
##########
@@ -147,11 +148,15 @@ private static Literal getDateTimeLiteral(String value, 
Type type) throws Analys
             } else if (type.isDatetimeV2()) {
                 return new DateTimeV2Literal(value);
             } else if (type.isTimeStampTz()) {
+                if (hasExplicitTimeZone(value)) {
+                    return 
Literal.fromLegacyLiteral(DateLiteralUtils.createDateLiteral(
+                            normalizeTimestampTzOffset(value), type), type);

Review Comment:
   This new explicit-time-zone branch rejects valid TIMESTAMPTZ literals that 
use named or lowercase zones. `hasExplicitTimeZone()` returns true for values 
like `2024-01-15 12:00:00Asia/Shanghai` or `2024-01-15 12:00:00 utc`, so they 
are routed here, but `DateLiteralUtils` only detects uppercase letters as 
timezone names and `getTimeZoneSplitPos()` only walks uppercase letters and 
`/`. For `Asia/Shanghai` it computes an empty `tzString`, and for lowercase 
`utc` it does not strip the zone at all, so table creation fails even though 
the normal Nereids TIMESTAMPTZ parser accepts these forms (see the existing 
`DateTimeLiteralTest`/`TimestampTzLiteralTest` cases around `Asia/Shanghai` and 
`uTc`). Please parse explicit TIMESTAMPTZ partition values with the same 
TIMESTAMPTZ literal parser, or extend this path and its tests to cover named 
and lowercase zones.



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