Skip to content

Conversation

@szehon-ho
Copy link
Member

@szehon-ho szehon-ho commented Jan 8, 2026

What changes were proposed in this pull request?

The MergeIntoTableSuiteBase class had become unwieldy (7200+ lines), of which around 5000 lines were schema evolution tests

  1. Move the many Merge Into Schema Evolution tests into their own file
  2. Make helper methods testEvolution , etc (this is inspired by Delta Lake, see https://github.com/delta-io/delta/blob/master/spark/src/test/scala/org/apache/spark/sql/delta/MergeIntoSchemaEvolutionSuite.scala ). These will run the tests a. with schema evolution, 2. without schema evolution, and 3. using coerceNestedTypes on and off if applicable
  3. Migrate all ~70 tests to use that framework
  4. Add even more dimensions (group-based vs delta-based MERGE, Scala API, SQL)

Why are the changes needed?

  1. This cuts down the tests from 5000 lines to less than 3000 lines.
  2. Inspired by Delta Lake's test approach, this makes it a bit easier to see what is being tested by focusing on the differences in data/schema and expectations.

Does this PR introduce any user-facing change?

No, only test

How was this patch tested?

Run existing test

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

A bit using Claude 4.5 opus, but mostly hand tuning

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

JIRA Issue Information

=== Test SPARK-54975 ===
Summary: Refactor Merge Into Schema Evolution Tests
Assignee: None
Status: Open
Affected: ["4.1.0"]


This comment was automatically generated by GitHub Actions

@github-actions github-actions bot added the SQL label Jan 8, 2026
@szehon-ho
Copy link
Member Author

@cloud-fan can you help take a look? thanks

/**
* Base trait containing merge into schema evolution tests.
*/
trait MergeIntoSchemaEvolutionTests extends MergeIntoSchemaEvolutionSuiteBase {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this for delta-based merge into only? because group-based test suites do not extend it.

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