yujun777 commented on code in PR #44637:
URL: https://github.com/apache/doris/pull/44637#discussion_r1860048448


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/SimplifyRange.java:
##########
@@ -498,41 +494,53 @@ private UnknownValue(ExpressionRewriteContext context, 
Expression expr) {
             mergeExprOp = null;
         }
 
-        public UnknownValue(ExpressionRewriteContext context,
-                List<ValueDesc> sourceValues, Expression exprForNonNull, 
BinaryOperator<Expression> mergeExprOp) {
-            super(context, sourceValues.get(0).reference, exprForNonNull);
+        public UnknownValue(ExpressionRewriteContext context, Expression 
toExpr,
+                List<ValueDesc> sourceValues, BinaryOperator<Expression> 
mergeExprOp) {
+            super(context, genReference(sourceValues, toExpr), toExpr);
             this.sourceValues = ImmutableList.copyOf(sourceValues);
             this.mergeExprOp = mergeExprOp;
         }
 
+        private static Expression genReference(List<ValueDesc> sourceValues, 
Expression toExpr) {

Review Comment:
   > add some comment to explain why need generate reference from `toExpr`
   
   had add comment



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

Reply via email to