yujun777 commented on code in PR #44732:
URL: https://github.com/apache/doris/pull/44732#discussion_r1862389338
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/ExpressionUtils.java:
##########
@@ -207,6 +207,22 @@ public static Expression or(Collection<Expression>
expressions) {
return combineAsLeftDeepTree(Or.class, expressions);
}
+ public static Expression getFalse(Expression expression) {
+ if (expression.nullable()) {
+ return new And(new IsNull(expression), new
NullLiteral(BooleanType.INSTANCE));
+ } else {
+ return BooleanLiteral.FALSE;
+ }
+ }
+
+ public static Expression getTrue(Expression expression) {
Review Comment:
> maybe trueOrNull is a better name?
fix
--
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]