Skip to content

Conversation

andyl-db
Copy link

What changes were proposed in this pull request?

This PR:

  • wraps plan analysis in AnalysisContext.withNewAnalysisContext instead of resetting the AnalysisContext
  • unit test for ensureing that nested plan resolution does not reset the origin AnalysisContext

Why are the changes needed?

Bug: when there are nested plans being analyzed, the AnalysisContext gets reset. When resolving rules after the AnalysisContext gets reset, it may cause unexpected behavior because origin AnalysisContext is no longer preserved.

This change preserves the AnalysisContext after the nested plan has been analyzed.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit tested

TODO: need SPARK ticket + to talk with Spark experts regarding what unresolved plan to use to trigger nested plan

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

No

@github-actions github-actions bot added the SQL label Sep 12, 2025
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.

1 participant