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


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/MultiPartitionDesc.java:
##########
@@ -381,11 +403,83 @@ private static DateTimeFormatter dateFormat(TimeUnit 
timeUnitType,
     }
 
     private DateTimeFormatter dateTypeFormat(String dateTimeStr) {
-        String s = DATE_FORMAT;
-        if (this.timeUnitType.equals(TimeUnit.HOUR) || dateTimeStr.length() == 
19) {
-            s = DATETIME_FORMAT;
+        if (isTimestampTzFormat(dateTimeStr)) {
+            return dateTimeFormatter(stripTimeZone(dateTimeStr));
+        }
+        if (this.timeUnitType.equals(TimeUnit.HOUR) || 
isDateTimeFormat(dateTimeStr)) {
+            return dateTimeFormatter(dateTimeStr);
+        }
+        return DateTimeFormatter.ofPattern(DATE_FORMAT);
+    }
+
+    private String formatPartitionDateTime(LocalDateTime dateTime, String 
originalDateTimeStr) {

Review Comment:
   This accepts fractional DATETIME strings up to six digits, but `trans()` 
still parses start/end via `TimeUtils.formatDateTimeAndFullZero()`, which only 
reads `ChronoField.MILLI_OF_SECOND` and builds `LocalTime` from `milliSecond * 
1000000`. A `DATETIMEV2(6)` or `TIMESTAMPTZ(6)` step partition such as `FROM 
('2024-01-01 00:00:00.123456') ... INTERVAL 1 DAY` reaches this path after 
`strictTypedPartitionExpression()` preserves a six-scale string, then the 
expanded bounds are generated from `LocalDateTime` with `.123000` instead of 
`.123456`. That shifts the user-specified partition boundaries. Please 
parse/preserve microsecond precision here and add scale-6 step/multi partition 
coverage.



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