[
https://issues.apache.org/jira/browse/CALCITE-6567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17880448#comment-17880448
]
Mihai Budiu commented on CALCITE-6567:
--------------------------------------
Maybe you can be more specific about how to reproduce the bug.
The plan does not really throw errors, it's the compiler, when processing a
specific query.
> 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
> Priority: Major
>
> 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)