Skip to content

[SPARK-40259][SQL][FOLLOWUP] Add cross-table DSv2 scan merge regression test - #58202

Closed
cloud-fan wants to merge 1 commit into
apache:masterfrom
cloud-fan:SPARK-40259-followup-248101
Closed

[SPARK-40259][SQL][FOLLOWUP] Add cross-table DSv2 scan merge regression test#58202
cloud-fan wants to merge 1 commit into
apache:masterfrom
cloud-fan:SPARK-40259-followup-248101

Conversation

@cloud-fan

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Followup to #57360.

Add an end-to-end regression test verifying that Data Source V2 scans of two different tables are
not merged, even when both tables opt into scan merging and the query shapes are otherwise similar.

Why are the changes needed?

Merging scans from different tables could corrupt the optimized plan and return incorrect query
results. The existing implementation compares canonical relations, and this test protects that
table-identity safety boundary.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added coverage to DSv2PlanMergingSuite and ran the full suite.

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

Generated-by: OpenAI Codex (GPT-5)

@cloud-fan

Copy link
Copy Markdown
Contributor Author

@peter-toth

@uros-b

uros-b commented Aug 21, 2026

Copy link
Copy Markdown
Member

Thank you @cloud-fan and @peter-toth!

@cloud-fan

Copy link
Copy Markdown
Contributor Author

thanks for review, merging to master/4.x

@cloud-fan cloud-fan closed this in f791085 Aug 24, 2026
cloud-fan added a commit that referenced this pull request Aug 24, 2026
…on test

### What changes were proposed in this pull request?

Followup to #57360.

Add an end-to-end regression test verifying that Data Source V2 scans of two different tables are
not merged, even when both tables opt into scan merging and the query shapes are otherwise similar.

### Why are the changes needed?

Merging scans from different tables could corrupt the optimized plan and return incorrect query
results. The existing implementation compares canonical relations, and this test protects that
table-identity safety boundary.

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

No.

### How was this patch tested?

Added coverage to `DSv2PlanMergingSuite` and ran the full suite.

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

Generated-by: OpenAI Codex (GPT-5)

Closes #58202 from cloud-fan/SPARK-40259-followup-248101.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit f791085)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@cloud-fan

Copy link
Copy Markdown
Contributor Author

Merge Summary:

Posted by merge_spark_pr.py

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.

4 participants