Skip to content

Conversation

dusantism-db
Copy link
Contributor

@dusantism-db dusantism-db commented Mar 18, 2025

What changes were proposed in this pull request?

This PR reverts #48786

Why are the changes needed?

Custom rules in the early analyzer batches (custom hint resolution rules injection) can match UnresolvedRelation, which is only visible after the IDENTIFIER clause is expanded.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests + added a unit test.

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

No.

@github-actions github-actions bot added the SQL label Mar 18, 2025
@dusantism-db dusantism-db marked this pull request as ready for review March 18, 2025 17:51
import org.apache.spark.sql.connector.catalog.CatalogV2Implicits._

val query = Option(ctx.query).map(plan)
withIdentClause(ctx.identifierReference, query.toSeq, (ident, children) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we keep this part? I think it's still better to not hide any plan from PlanWithUnresolvedIdentifier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cloud-fan Done.

@cloud-fan
Copy link
Contributor

thanks, merging to master/4.0!

@cloud-fan cloud-fan closed this in 7dfb8fe Mar 20, 2025
cloud-fan pushed a commit that referenced this pull request Mar 20, 2025
…ithUnresolvedIdentifier""

### What changes were proposed in this pull request?
This PR reverts #48786

### Why are the changes needed?
Custom rules in the early analyzer batches (custom hint resolution rules injection) can match `UnresolvedRelation`, which is only visible after the IDENTIFIER clause is expanded.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing tests + added a unit test.

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

No.

Closes #50311 from dusantism-db/identifier-revert.

Authored-by: Dušan Tišma <dusan.tisma@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 7dfb8fe)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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.

2 participants