npaincomplet opened a new pull request, #5413: URL: https://github.com/apache/calcite/pull/5413
## Jira Link [CALCITE-7934](https://issues.apache.org/jira/browse/CALCITE-7934) ## Changes Proposed After AggregateProjectMergeRule, Aggregate uniqueness metadata can confuse input ordinals with the packed positions of grouping columns in the Aggregate output. This can cause AggregateRemoveRule to remove a required Aggregate and change query results. This change: - maps Aggregate output grouping positions back to input groupSet ordinals; - uses groupCount as the offset of aggregate-call results; - maps inferred input unique keys into Aggregate output positions; - handles constant grouping columns and grouping sets in the correct coordinate space; - adds direct metadata coverage and two Quidem wrong-result reproducers. ## Testing - ./gradlew style - ./gradlew :core:test --tests org.apache.calcite.test.RelMetadataTest - ./gradlew build -x rat -- 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]
