Brandon Chong created CALCITE-6567:
--------------------------------------
Summary: RelDecorrelator has assertion error for AggregateRels
Key: CALCITE-6567
URL: https://issues.apache.org/jira/browse/CALCITE-6567
Project: Calcite
Issue Type: Bug
Reporter: Brandon Chong
The following query plan:
```
LogicalCorrelate(correlation=[$cor0], joinType=[left], requiredColumns=[\{0}])
LogicalTableScan(table=[[DEPT]])
LogicalAggregate(group=[\{7}], agg#0=[MAX($5)])
LogicalFilter(condition=[=($cor0.DEPTNO, $7)])
LogicalTableScan(table=[[EMP]])
```
Throws an assertion error due to:
`assert allLessThan(this.oldToNewOutputs.keySet(),
oldRel.getRowType().getFieldCount(), Litmus.THROW);`
which is caused by this change:
https://issues.apache.org/jira/browse/CALCITE-5081
Since it is adding `idx` to outputMap, which is a value greater than
oldRel.getRowType().getFieldCount().
I changed it back in my local fork and it seems to work, but I am not sure if
that is the proper fix.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)