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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to