morrySnow commented on code in PR #64026:
URL: https://github.com/apache/doris/pull/64026#discussion_r3397556990
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/PartitionDefinition.java:
##########
@@ -189,12 +200,73 @@ public void setPartitionTypes(List<DataType>
partitionTypes) {
this.partitionTypes = partitionTypes;
}
+ protected void ensurePartitionTypesInitialized() {
+ if (partitionTypes == null) {
+ throw new AnalysisException("partitionTypes should be initialized
before validating partition definition");
+ }
+ }
+
+ protected Expression typedPartitionExpression(Expression expression, int
index) {
+ ensurePartitionTypesInitialized();
+ return strictTypedPartitionExpression(expression,
partitionTypes.get(index));
+ }
+
+ static Expression strictTypedPartitionExpression(Expression expression,
DataType targetType) {
+ if (expression instanceof MaxValue || expression instanceof
MaxLiteral) {
Review Comment:
MaxValue 和 MaxLiteral 什么关系,什么区别?
--
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]