NobiGo commented on code in PR #2811:
URL: https://github.com/apache/calcite/pull/2811#discussion_r1772499541


##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -1958,7 +1959,33 @@ private RelOptUtil.Exists convertExists(
       if (!values.getTuples().isEmpty()) {
         unionInputs.add(values);
       }
-      resultRel = LogicalUnion.create(unionInputs, true);
+      RelDataType finalRowType = rowType;

Review Comment:
   Yes, I get it. UNION_TO_VALUES works in the optimization phase. But here is 
to convert the SQL to the RelNode phase. 
   Before this PR. SQL like `cast(number as bigint) in (12,13,14) ` can convert 
to 'VALUES' when converting the SQL to the RelNode. I hope to keep the 
semantics here unchanged, so I added it here. If we don't do this, the RelNode 
converted here will be different from the previous version. According to the 
review comment in Jira https://issues.apache.org/jira/browse/CALCITE-5156 it is 
unacceptable.



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

Reply via email to