mihaibudiu commented on code in PR #2811:
URL: https://github.com/apache/calcite/pull/2811#discussion_r1772399590
##########
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:
I think you are fixing a symptom of the bug, and not the actual bug.
This fix should work no matter which subquery is present. It would work even
if the subquery is a union, or a LogicalValues, or any other query.
The fact that you have to handle union of values specially suggests that you
are not fixing the bug in the issue, but another bug. Maybe the issue is wrong,
and this is a bug with Union.
--
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]