suibianwanwank commented on code in PR #4398:
URL: https://github.com/apache/calcite/pull/4398#discussion_r2106131776
##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -331,6 +333,25 @@ protected RelNode decorrelate(RelNode root) {
final Frame frame = getInvoke(root, false, null);
if (frame != null) {
+ // Check if the frame has more fields than the original and discard the
extra ones
Review Comment:
The check here can be stricter. oldToNewOutputs represents the field mapping
between the original RelNode and the fields after decorrelating. Assuming the
original RelNode has a fieldCount of 5, oldToNewOutputs must include the range
[0..4] along with their new outputs.
--
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]