Skip to content

Reject non-indexable aggregates in GroupByExpression.subsumedBy() - #4643

Draft
robert-brunel wants to merge 1 commit into
mainfrom
apple/robert-brunel/array-agg-aggregate-index-match
Draft

robert-brunel wants to merge 1 commit into
mainfrom
apple/robert-brunel/array-agg-aggregate-index-match

Conversation

@robert-brunel

Copy link
Copy Markdown
Contributor

In GroupByExpression.subsumedBy(), reject non-indexable aggregates before decomposing them. This, in particular, fixes the ORDERING_IS_OF_INCOMPATIBLE_TYPE semantic error during planning when an ARRAY_AGG() query is executed against a schema that carries any aggregate index.

@robert-brunel robert-brunel self-assigned this Sep 18, 2026
@robert-brunel robert-brunel added bug fix Change that fixes a bug Run mixed-mode Label to add to Pull Requests to have it run mixed mode tests labels Sep 18, 2026
…pression.subsumedBy()`

This, in particular, fixes the `ORDERING_IS_OF_INCOMPATIBLE_TYPE` semantic error during planning when an `ARRAY_AGG()` query is executed against a schema that carries any aggregate index.
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/array-agg-aggregate-index-match branch from f3a73f0 to 5d34bbd Compare September 18, 2026 19:54
@github-actions

Copy link
Copy Markdown

📊 Metrics Diff Analysis Report

Summary

  • New queries: 7
  • Dropped queries: 0
  • Plan changed + metrics changed: 0
  • Plan unchanged + metrics changed: 0
ℹ️ About this analysis

This automated analysis compares query planner metrics between the base branch and this PR. It categorizes changes into:

  • New queries: Queries added in this PR
  • Dropped queries: Queries removed in this PR. These should be reviewed to ensure we are not losing coverage.
  • Plan changed + metrics changed: The query plan has changed along with planner metrics.
  • Metrics only changed: Same plan but different metrics

The last category in particular may indicate planner regressions that should be investigated.

New Queries

Count of new queries by file:

  • yaml-tests/src/test/resources/array-agg-tests.metrics.yaml: 7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Change that fixes a bug Run mixed-mode Label to add to Pull Requests to have it run mixed mode tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant