Skip to content

[SPARK-50319] Reorder ResolveIdentifierClause and BindParameter rules#48849

Closed
srielau wants to merge 3 commits intoapache:masterfrom
srielau:SPARK-50319-Reorder-ResolveIdentifiertClause
Closed

[SPARK-50319] Reorder ResolveIdentifierClause and BindParameter rules#48849
srielau wants to merge 3 commits intoapache:masterfrom
srielau:SPARK-50319-Reorder-ResolveIdentifiertClause

Conversation

@srielau
Copy link
Contributor

@srielau srielau commented Nov 14, 2024

What changes were proposed in this pull request?

The current relative order of rules is:

  1. ResolveRelations
  2. ResolveIdentifierClause
  3. BindParameters

These rules interact in exactly the opposite way as they are listed:

  • BindParameters always operates on leafs
  • ResolveIdentifierClause turns constant expressions (typically parameters) into UnresolvedRelations
  • ResolveRelations is needed to progress resolved identifier clauses
     
    We propose to move BindParameters and ResolveIdentifierClause up.

Why are the changes needed?

This has two effects:

  1. The rule batch will converge faster, saving premature passes over the tree.
  2. "Sloppily" written rule extensions which come last have a lesser chance of not seeing UnresolvedRelation

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests suffice

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

No

@github-actions github-actions bot added the SQL label Nov 14, 2024
@srielau srielau force-pushed the SPARK-50319-Reorder-ResolveIdentifiertClause branch from 8256d25 to ead1fc9 Compare November 14, 2024 23:05
@github-actions
Copy link

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Feb 24, 2025
@github-actions github-actions bot closed this Feb 25, 2025
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