Skip to content

[SPARK-57197][SQL][FOLLOWUP] Improve test coverage for merge into schema evolution#56242

Open
jiwen624 wants to merge 1 commit into
apache:masterfrom
jiwen624:spark-56462-followup-test-coverage
Open

[SPARK-57197][SQL][FOLLOWUP] Improve test coverage for merge into schema evolution#56242
jiwen624 wants to merge 1 commit into
apache:masterfrom
jiwen624:spark-56462-followup-test-coverage

Conversation

@jiwen624
Copy link
Copy Markdown
Contributor

@jiwen624 jiwen624 commented Jun 1, 2026

What changes were proposed in this pull request?

This is a follow-up PR from the comment #55329 (comment) - to add test coverage for MERGE INTO schema evolution:

  • Nested field with a special-char name.
  • Special-char column that already exists in the target.

Why are the changes needed?

To increase test coverage of MERGE INTO schema evolution.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added test cases

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

Yes. Claude Code

@jiwen624 jiwen624 marked this pull request as ready for review June 1, 2026 18:54
@jiwen624 jiwen624 changed the title [SPARK-56462][SQL][FOLLOWUP] Add test coverage for merge into schema evolution [SPARK-56462][SQL][FOLLOWUP] Improve test coverage for merge into schema evolution Jun 1, 2026
@jiwen624
Copy link
Copy Markdown
Contributor Author

jiwen624 commented Jun 1, 2026

@szehon-ho Could you review this follow-up PR improving the test coverage of MERGE INTO schema evolution? I’m reusing the Jira for this PR but please let me know if it needs to be under a separate one 🙇

Copy link
Copy Markdown
Member

@szehon-ho szehon-ho left a comment

Choose a reason for hiding this comment

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

Yes let's make a new JIRA. Could you also add a test for missing source field with special char (and nested as well)

}

for (colName <- Seq("job.title", "job title")) {
testEvolution(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: could we do this for nested struct as well?

@jiwen624 jiwen624 changed the title [SPARK-56462][SQL][FOLLOWUP] Improve test coverage for merge into schema evolution [SPARK-57197][SQL][FOLLOWUP] Improve test coverage for merge into schema evolution Jun 1, 2026
@jiwen624 jiwen624 force-pushed the spark-56462-followup-test-coverage branch 2 times, most recently from b97ab13 to bae9b86 Compare June 2, 2026 16:29
@jiwen624
Copy link
Copy Markdown
Contributor Author

jiwen624 commented Jun 2, 2026

@szehon-ho I added test cases per your comments. The build is currently failing because of the issue being fixed by this PR (still open) and another flaky test. I'll rebase and rebuild it once that fix is merged.

Copy link
Copy Markdown
Member

@szehon-ho szehon-ho left a comment

Choose a reason for hiding this comment

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

thanks, just had two style nits


for (colName <- Seq("job.title", "job title")) {
testEvolution(
s"SPARK-57197: target has special-char column missing from source: $colName")(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: can we remove the SPARK JIRA from these tests? its not very helpful


for (subFieldName <- Seq("job.title", "job title")) {
testNestedStructsEvolution(
s"SPARK-57197: source struct missing nested field with special-char name: $subFieldName")(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we harmonize the description with the previous (ie, target has ... missing from source')

@jiwen624 jiwen624 force-pushed the spark-56462-followup-test-coverage branch from bae9b86 to fc9baf8 Compare June 2, 2026 21:51
@jiwen624 jiwen624 force-pushed the spark-56462-followup-test-coverage branch from fc9baf8 to 303c992 Compare June 3, 2026 05:16
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.

2 participants