NO SNOW: fix bug in xml read when custom schema is non structtype.#4065
Merged
sfc-gh-yuwang merged 6 commits intomainfrom Feb 4, 2026
Merged
NO SNOW: fix bug in xml read when custom schema is non structtype.#4065sfc-gh-yuwang merged 6 commits intomainfrom
sfc-gh-yuwang merged 6 commits intomainfrom
Conversation
sfc-gh-aling
approved these changes
Feb 3, 2026
sfc-gh-aling
reviewed
Feb 3, 2026
CHANGELOG.md
Outdated
| #### Bug Fixes | ||
|
|
||
| - Fixed a bug that opentelemetry is not correctly import when using `Session.client_telemetry.enable_event_table_telemetry_collection`. | ||
| - Fixed a bug when reading xml with custom schema, result include element attributes when column is not `StructType` type. |
Contributor
There was a problem hiding this comment.
nit: please move to 1.46.0
Removed duplicate bug fix entry for XML reading issue and updated improvements section.
sfc-gh-joshi
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-NNNNNNN
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
when reading a xml file like this:
<test><num>1</num><str1>NULL</str1><str2></str2><str3 id="empty">xxx</str3></test>with code:
test_schema = StructType([StructField("num", IntegerType(), True),StructField("str1", StringType(), True),StructField("str2", StringType(), True),StructField("str3", StringType(), True),])df = (spark.read.option("rowTag", "test").schema(test_schema).xml("<file path>"))print(df.collect())pyspark give you:
[Row(num=1, str1='NULL', str2='', str3='xxx')]while currently snowpark would give you:
[Row(num=1, str1='NULL', str2='', str3='{"_VALUE": "xxx", "_id": "empty"}']indicating that current xml custom schema does not process element with attributes + schema is not structtype correctly. this PR is meant to fix this bug