Skip to content

[SPARK-52686][SQL][FOLLOWUP] Don't push Project through Union if there are duplicates in the project list #51628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mihailotim-db
Copy link
Contributor

What changes were proposed in this pull request?

Don't push Project through Union if there are duplicates in the project list.

Why are the changes needed?

This is fixing a change made in #51376. Pushing down the Project and deduplicating its output with aliases can cause DUPLICATED_FIELD_NAME_IN_ARROW_STRUCT in FlatMapGroup queries because schema deduplication logic relies on ExprIds in order to deduplicate field names.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added a new test case.

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

No

@github-actions github-actions bot added the SQL label Jul 23, 2025
@mihailotim-db mihailotim-db force-pushed the mihailotim-db/push_through_project branch from e20fe34 to bf7cde6 Compare July 23, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants