jinxing64 commented on a change in pull request #1495: [CALCITE-3399]
Field-pruning for set operators (except UNION ALL) changes query semantics
URL: https://github.com/apache/calcite/pull/1495#discussion_r335297881
##########
File path: core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java
##########
@@ -697,14 +697,20 @@ public TrimResult trimFields(
/**
* Variant of {@link #trimFields(RelNode, ImmutableBitSet, Set)} for
- * {@link org.apache.calcite.rel.core.SetOp} (including UNION and UNION ALL).
+ * {@link org.apache.calcite.rel.core.Union}.
Review comment:
Sure, updated ~
Regarding the sanity check, I just check and skip the trimming logic when
it's not `UNION ALL`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services