yujun777 commented on code in PR #44637: URL: https://github.com/apache/doris/pull/44637#discussion_r1859760240
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/SimplifyRange.java: ########## @@ -271,8 +271,8 @@ public static ValueDesc discrete(ExpressionRewriteContext context, InPredicate i private static class EmptyValue extends ValueDesc { - public EmptyValue(ExpressionRewriteContext context, Expression reference, Expression exprForNonNull) { - super(context, reference, exprForNonNull); + public EmptyValue(ExpressionRewriteContext context, Expression reference, Expression toExpr) { + super(context, reference, toExpr); } @Override Review Comment: > do not need to change `union` and `intersect` of `EmptyValue`? if A op B's references are different, then generate a UnknownValue, this UnknownValue would keep both A and B, no delete any of them. so if A op B got result is A, or result is B, then we known that A and B's referece must be the same. so for A op B, if A is EmptyValue, then 1) if B's reference different with A's reference, then generate a UnknownValue, UnknownValue's toExpression will keep both A and B 2) if B's reference equals to A's reference, then EmptyValue union B = B is ok, EmptyValue intersect B = EmptyValue is ok too. ########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/SimplifyRange.java: ########## @@ -271,8 +271,8 @@ public static ValueDesc discrete(ExpressionRewriteContext context, InPredicate i private static class EmptyValue extends ValueDesc { - public EmptyValue(ExpressionRewriteContext context, Expression reference, Expression exprForNonNull) { - super(context, reference, exprForNonNull); + public EmptyValue(ExpressionRewriteContext context, Expression reference, Expression toExpr) { + super(context, reference, toExpr); } @Override Review Comment: for A union / intersect B, if met A is EmptyValue, then A and B's reference should always be the same. so EmptyValue union another ValueDesc with the same reference, the EmptyValue really remove ? and insect with aother valueDesc with the same reference, only keep this EmptyValue is ok ? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org