github-actions[bot] commented on code in PR #64026:
URL: https://github.com/apache/doris/pull/64026#discussion_r3432448894
##########
regression-test/data/external_table_p0/iceberg/iceberg_schema_change_ddl.out:
##########
@@ -240,7 +240,7 @@ test_decimal decimal(10,2) Yes true \N
-- !partition_init_1 --
id int Yes true \N
-name text Yes true \N
+name varchar(65533) Yes true \N
age int Yes true \N
Review Comment:
`git diff --check 08cd09f4ff5d3a91c0438b5371426ad772f6c74f
0a3d562eb11c2e1654d70896e26a2c19ccf8e0be` fails on this generated result file
because these added lines have trailing whitespace. The new TIMESTAMPTZ `.out`
file also has a blank line at EOF. Please regenerate or trim the `.out` files
so the patch passes whitespace checks.
##########
fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java:
##########
@@ -298,25 +300,45 @@ private ArrayList<AddPartitionOp>
getAddPartitionOp(Database db, OlapTable olapT
nowPartitionPrevBorder,
dynamicPartitionProperty.getTimeUnit());
for (; idx <= dynamicPartitionProperty.getEnd(); idx++) {
- String prevBorder = DynamicPartitionUtil.getPartitionRangeString(
- dynamicPartitionProperty, now, idx, partitionFormat);
- String nextBorder = DynamicPartitionUtil.getPartitionRangeString(
- dynamicPartitionProperty, now, idx + 1, partitionFormat);
- PartitionValue lowerValue = new PartitionValue(prevBorder);
- PartitionValue upperValue = new PartitionValue(nextBorder);
-
boolean isPartitionExists = false;
Range<PartitionKey> addPartitionKeyRange;
+ PartitionValue lowerValue;
+ PartitionValue upperValue;
+ String prevBorder;
+ String nextBorder;
+ try {
+ prevBorder = DynamicPartitionUtil.getPartitionRangeString(
+ dynamicPartitionProperty, now, idx, partitionFormat);
+ prevBorder =
PartitionExprUtil.normalizePartitionValueString(prevBorder,
partitionColumn.getType());
+ nextBorder = DynamicPartitionUtil.getPartitionRangeString(
Review Comment:
Dynamic partition bounds are generated in
`dynamicPartitionProperty.getTimeZone()` (`now` is built with that zone and
`getPartitionRangeString` formats a timezone-less local string), but this
normalization path parses TIMESTAMPTZ values through
`TimestampTzLiteral.fromSessionTimeZone`. The scheduler runs without a
`ConnectContext`, so `getSessionTimeZone()` falls back to UTC. For a
TIMESTAMPTZ table with `"dynamic_partition.time_zone" = "Asia/Shanghai"`, a DAY
boundary like `2026-06-18 00:00:00` is intended to mean `2026-06-17
16:00:00+00:00`, but this stores `2026-06-18 00:00:00+00:00`, shifting every
add/drop/reserved range by 8 hours. Please normalize these scheduler-generated
TIMESTAMPTZ bounds with the dynamic partition timezone (or append an explicit
zone before parsing), and apply the same fix to the drop/reserved-history paths
below; keep the raw local boundary for partition naming if the typed literal is
converted to UTC.
--
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]