Skip to content

Conversation

@jdavidroberts
Copy link

This adds two regression tests for SPARK-45414 to prevent reintroduction of the bug where string tag content was misplaced when writing XML with mixed column types (structs, arrays, and strings).

Tests verify:

  • String columns between and after nested types write correctly
  • Attributes mixed with string elements serialize properly

What changes were proposed in this pull request?

Add two regression tests for SPARK-45414 to prevent reintroduction of the bug where string tag content could be misplaced when writing XML with mixed column types.

Why are the changes needed?

SPARK-45414 reported a bug in the spark-xml library where string content was misplaced when writing structs with mixed types. While this bug was fixed during spark-xml integration into Spark core, there were no tests ensuring this specific scenario remains correct. These tests provide coverage for the bug scenario.

Does this PR introduce any user-facing change?

No, this only adds test coverage.

How was this patch tested?

The new tests were run successfully:

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

Yes, co-authored with Claude Sonnet 4.5.

Generated-by: Claude Sonnet 4.5

…ialization

This adds two regression tests for SPARK-45414 to prevent reintroduction
of the bug where string tag content was misplaced when writing XML with
mixed column types (structs, arrays, and strings).

Tests verify:
- String columns between and after nested types write correctly
- Attributes mixed with string elements serialize properly

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added the SQL label Jan 19, 2026
@github-actions
Copy link

JIRA Issue Information

=== Bug SPARK-45414 ===
Summary: spark-xml misplaces string tag content
Assignee: None
Status: Open
Affected: ["3.3.0"]


This comment was automatically generated by GitHub Actions

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