starocean999 commented on code in PR #65219:
URL: https://github.com/apache/doris/pull/65219#discussion_r3584021386


##########
fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java:
##########
@@ -372,23 +407,30 @@ private ArrayList<AddPartitionOp> 
getAddPartitionOp(Database db, OlapTable olapT
                         
dynamicPartitionProperty.getReplicaAllocation().toCreateStmt());
             }
 
-            // set storage_medium and storage_cooldown_time based on 
dynamic_partition.hot_partition_num
-            setStorageMediumProperty(partitionProperties, 
dynamicPartitionProperty, now, hotPartitionNum, idx);
+            // set storage_medium and storage_cooldown_time based on 
dynamic_partition.hot_partition_num.
+            // Use `now` (UTC-based for TIMESTAMPTZ) so the cooldown boundary
+            // aligns with the partition's UTC range, not the configured 
timezone.
+            // convertToUtcTimestamp (called inside) is a no-op for 
non-TIMESTAMPTZ
+            // columns; for TIMESTAMPTZ it appends a +00:00 suffix so 
PropertyAnalyzer
+            // can detect this as an unambiguous UTC instant.
+            setStorageMediumProperty(partitionProperties, 
dynamicPartitionProperty, now,
+                    hotPartitionNum, idx, partitionColumn, borderTimeZone);
 
             if (StringUtils.isNotEmpty(storagePolicyName)) {
-                setStoragePolicyProperty(partitionProperties, 
dynamicPartitionProperty, now, idx, storagePolicyName);
+                setStoragePolicyProperty(partitionProperties, 
dynamicPartitionProperty, now, idx,
+                        storagePolicyName, partitionColumn, borderTimeZone);
             }
 
             String partitionName = dynamicPartitionProperty.getPrefix()
-                    + 
DynamicPartitionUtil.getFormattedPartitionName(dynamicPartitionProperty.getTimeZone(),
+                    + 
DynamicPartitionUtil.getFormattedPartitionName(borderTimeZone,

Review Comment:
   description is updated



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