You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Matt Zhang (Jira)" <ji...@apache.org> on 2026/06/22 23:02:00 UTC

[jira] [Created] (SPARK-57624) from_xml to variant should honor the parse mode

Matt Zhang created SPARK-57624:
----------------------------------

             Summary: from_xml to variant should honor the parse mode
                 Key: SPARK-57624
                 URL: https://issues.apache.org/jira/browse/SPARK-57624
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 5.0.0
            Reporter: Matt Zhang


from_xml(..., 'variant', map('mode', ...)) ignores the parse mode. XmlToStructsEvaluator.evaluate calls StaxXmlParser.parseVariant directly for variant output, bypassing the FailureSafeParser the struct path uses, so a malformed record (e.g. an illegal XML control char) aborts the whole job even under PERMISSIVE.

It also fails under whole-stage codegen: XmlToStructs.doGenCode hardcasts the result to InternalRow (compile error for variant output) and does not null-check the result.

PR: https://github.com/apache/spark/pull/56681



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org