Skip to content

[SPARK-56944] [SQL] Trim aliases from ListAgg expression subtree#55984

Open
mihailoale-db wants to merge 1 commit into
apache:masterfrom
mihailoale-db:fixlistagg
Open

[SPARK-56944] [SQL] Trim aliases from ListAgg expression subtree#55984
mihailoale-db wants to merge 1 commit into
apache:masterfrom
mihailoale-db:fixlistagg

Conversation

@mihailoale-db
Copy link
Copy Markdown
Contributor

@mihailoale-db mihailoale-db commented May 19, 2026

What changes were proposed in this pull request?

In this PR I propose to trim aliases from ListAgg expression subtree in order to fix a discrepancy between single-pass and fixed-point analyzers.
It is a safe change since it would otherwise be removed in CleanupAliases.

Why are the changes needed?

To fix a dual-run issue.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added + existing tests.

Was this patch authored or co-authored using generative AI tooling?

Yes.

@mihailoale-db mihailoale-db changed the title [SPARK-56944] [SQL] Trim alises from ListAgg expression subtree [SPARK-56944] [SQL] Trim aliases from ListAgg expression subtree May 20, 2026
@mihailoale-db
Copy link
Copy Markdown
Contributor Author

@cloud-fan PTAL when you find time. Thanks!

Copy link
Copy Markdown
Contributor

@cloud-fan cloud-fan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Mihailo, the fix is reasonable and follows the pattern from SPARK-54871.

One question about completeness, and one about test coverage — see inline. Otherwise the change is straightforward.

Comment thread sql/core/src/test/resources/sql-tests/inputs/listagg.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants