etiennepelissier opened a new pull request, #5145: URL: https://github.com/apache/calcite/pull/5145
## Jira Link [CALCITE-7687](https://issues.apache.org/jira/browse/CALCITE-7687) ## Changes Proposed Same defect as CALCITE-4414, in the `Aggregate` overloads. An `Aggregate`'s output field `i` is input field `groupSet.nth(i)`, so a predicate expressed over the aggregate's output must be converted before it is pushed to the input. Adds `RelOptUtil.pushPastAggregate`, alongside the existing `pushPastProject` / `pushPastCalc`, and uses it from `RelMdSelectivity.getSelectivity(Aggregate, ...)` and `RelMdDistinctRowCount.getDistinctRowCount(Aggregate, ...)`. The former also has its pushability test corrected, from `getGroupSet()` (input indices) to `range(getGroupCount())` (output indices). Three cases added to `RelMetadataTest`; all three fail without this change. Mechanism, SQL repro and downstream impact are in the Jira. -- 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]
