jacktengg commented on code in PR #66761:
URL: https://github.com/apache/doris/pull/66761#discussion_r3826893532


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/PartitionExprUtil.java:
##########
@@ -252,15 +265,19 @@ private static PartitionValue getPartitionFromDate(Type 
partitionColumnType, Dat
             return PartitionValue.MAX_VALUE;
         }
 
+        LocalDateTime dateTime = dateLiteral instanceof DateLiteral
+                ? ((DateLiteral) dateLiteral).getTimeFormatter()
+                : ((TimeStampNsLiteral) dateLiteral).toLocalDateTime();
         String timeString;
         if (partitionColumnType.isDate() || partitionColumnType.isDateV2()) {
-            timeString = String.format(DATE_FORMATTER, dateLiteral.getYear(), 
dateLiteral.getMonth(),
-                    dateLiteral.getDay());
+            timeString = String.format(DATE_FORMATTER, dateTime.getYear(), 
dateTime.getMonthValue(),
+                    dateTime.getDayOfMonth());
         } else if (partitionColumnType.isDatetime() || 
partitionColumnType.isDatetimeV2()
+                || partitionColumnType.isTimeStampNs()

Review Comment:
   之前的已知问题,后续单独修复。



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