jackwener commented on code in PR #24899:
URL: https://github.com/apache/doris/pull/24899#discussion_r1336629547


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/SimplifyComparisonPredicate.java:
##########
@@ -200,9 +192,10 @@ private Expression 
processDateLikeTypeCoercion(ComparisonPredicate cp, Expressio
             // Date cp Date is not supported in BE storage engine. So cast to 
DateTime
             left = new Cast(left, DateTimeType.INSTANCE);
             if (right instanceof DateLiteral) {
-                right = migrateLiteralToDateTime((DateLiteral) originalRight);
+                DateLiteral l = (DateLiteral) right;
+                right = new DateTimeLiteral(l.getYear(), l.getMonth(), 
l.getDay(), 0, 0, 0);
             } else {
-                right = new Cast(originalRight, DateTimeType.INSTANCE);

Review Comment:
   BUG is here, use originalRight is wrong 



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