Skip to content

[BugFix] Fix GROUP BY expression resolution in SELECT/HAVING/ORDER BY#5548

Draft
dai-chen wants to merge 1 commit into
opensearch-project:mainfrom
dai-chen:fix/sql-groupby-expression-resolution
Draft

[BugFix] Fix GROUP BY expression resolution in SELECT/HAVING/ORDER BY#5548
dai-chen wants to merge 1 commit into
opensearch-project:mainfrom
dai-chen:fix/sql-groupby-expression-resolution

Conversation

@dai-chen

@dai-chen dai-chen commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Description

TODO

Related Issues

Part of #5248

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

A SELECT/HAVING/ORDER BY expression matching a GROUP BY expression now
resolves to the materialized group-key column via a context-scoped index
checked in visitFunction, instead of recomputing it from base fields the
aggregation removed (which failed with "Field not found").

Signed-off-by: Chen Dai <daichen@amazon.com>
@dai-chen dai-chen self-assigned this Jun 12, 2026
@dai-chen dai-chen added PPL Piped processing language bugFix SQL and removed PPL Piped processing language labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant