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


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ExprToStringValueVisitor.java:
##########
@@ -56,11 +56,29 @@ public String visitDateLiteral(DateLiteral expr, 
StringValueContext ctx) {
         String value;
         if (expr.getType().isTimeStampTz()) {
             try {
-                ZoneId dorisZone = DateUtils.getTimeZone();
-                String offset = 
dorisZone.getRules().getOffset(java.time.Instant.now()).toString();
-                DateLiteral dateLiteral = 
DateLiteralUtils.createDateLiteral(expr.getStringValue(),
-                        ScalarType.createDatetimeV2Type(((ScalarType) 
expr.getType()).getScalarScale()));
-                value = dateLiteral.getStringValue() + offset;
+                if (ctx.isForStreamLoad()) {

Review Comment:
   [P2] Preserve stream-load rendering inside STRUCT values
   
   This branch fixes scalar, ARRAY, and MAP values, but `visitStructLiteral()` 
evaluates its children with `ctx.asQueryComplexType()`, which clears 
`forStreamLoad`. A `STRUCT<TIMESTAMPTZ>` value in the 
transactional/group-commit row path therefore still takes the query branch: in 
an `Asia/Shanghai` session, `1900-01-01T00:00:00Z` becomes `1900-01-01 
08:05:43+08:05:43`. BE's TIMESTAMPTZ parser does not accept second-resolution 
offsets, so the nested value is rejected in strict mode (or can become NULL for 
a nullable field in non-strict mode). This is distinct from the existing 
top-level thread at line 67. Please preserve the stream-load bit for STRUCT 
children and add `STRUCT<TIMESTAMPTZ>` transactional-insert coverage for a 
pre-standard-offset instant.



##########
fe/fe-core/src/test/java/org/apache/doris/catalog/DynamicPartitionTableTest.java:
##########
@@ -318,7 +322,8 @@ public void testMissBuckets() throws Exception {
                 + "\"dynamic_partition.start\" = \"-3\",\n"
                 + "\"dynamic_partition.end\" = \"3\",\n"
                 + "\"dynamic_partition.time_unit\" = \"day\",\n"
-                + "\"dynamic_partition.prefix\" = \"p\"\n"
+                + "\"dynamic_partition.prefix\" = \"p\",\n"
+                + "\"dynamic_partition.buckets\" = \"1\"\n"

Review Comment:
   [P2] Keep the missing-property defaults under test
   
   `testMissBuckets` now supplies the bucket property it is named to omit, and 
`testMissTimeZone` similarly supplies `dynamic_partition.time_zone` at line 
415. These were the focused tests covering the defaulting branches in 
`DynamicPartitionUtil.checkInputDynamicPartitionProperties()` (table 
distribution bucket count and system timezone); with these additions both tests 
pass without exercising those contracts. Please remove the explicit properties 
and assert the resulting defaults instead.



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