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


##########
fe/fe-core/src/main/java/org/apache/doris/planner/ScanNode.java:
##########
@@ -367,6 +382,64 @@ public static ColumnRanges expressionToRanges(Expr expr,
         }
     }
 
+    /**
+     * Re-type a literal value to the partition column's type when the two
+     * primitive types belong to the same family (fixed-point, date, string, 
etc.)
+     * but differ in detail (e.g. INT vs BIGINT, DATE vs DATETIMEV2, STRING vs
+     * VARCHAR).  This is necessary because {@link ColumnBound} delegates to
+     * {@link PartitionKey#compareLiteralExpr} which rejects cross-type
+     * comparisons.  For example, a predicate {@code CAST(k AS BIGINT) = 1} on 
an
+     * INT partition column produces a BIGINT-typed literal that would fail to
+     * compare against INT partition bounds.
+     *
+     * <p>The re-parse is a best-effort: if {@code value} already has the exact

Review Comment:
   done



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