morrySnow commented on code in PR #63281:
URL: https://github.com/apache/doris/pull/63281#discussion_r3273047783


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/TimestampTzLiteral.java:
##########
@@ -64,6 +66,31 @@ public TimestampTzLiteral(TimeStampTzType dateType,
         roundMicroSecond(dateType.getScale());
     }
 
+    private void init(TimeStampTzType dateType, String s) {

Review Comment:
   i don't think this is a acceptable change. for TimestampTzLiteral, we should 
always treat the parameter `s` as a UTC date time string. So we should not 
adjust time zone when init.
   If u want to reduce the reduant code. maybe need a static function to handle 
the string representing the current time zone



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/PartitionExprUtil.java:
##########
@@ -261,6 +261,9 @@ private static PartitionValue getPartitionFromDate(Type 
partitionColumnType, Dat
             timeString = String.format(DATETIME_FORMATTER,
                     dateLiteral.getYear(), dateLiteral.getMonth(), 
dateLiteral.getDay(),
                     dateLiteral.getHour(), dateLiteral.getMinute(), 
dateLiteral.getSecond());
+            if (partitionColumnType.isTimeStampTz()) {
+                timeString = dateLiteral.getStringValue(partitionColumnType);

Review Comment:
   partition value string is used in too many place, add timezone to it is very 
dangerous



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