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

[jira] [Resolved] (SPARK-54099) XML to Variant conversion throws ArithmeticException on decimals with extreme exponents

     [ https://issues.apache.org/jira/browse/SPARK-54099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-54099.
----------------------------------
    Fix Version/s: 4.1.0
       Resolution: Fixed

Issue resolved by pull request 52801
[https://github.com/apache/spark/pull/52801]

> XML to Variant conversion throws ArithmeticException on decimals with extreme exponents
> ---------------------------------------------------------------------------------------
>
>                 Key: SPARK-54099
>                 URL: https://issues.apache.org/jira/browse/SPARK-54099
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.0.1
>            Reporter: Xiaonan Yang
>            Assignee: Xiaonan Yang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.1.0
>
>
> When parsing XML data with `parse_xml` that contains decimal numbers with very large 
> exponents (e.g., "1E+2147483647"), the conversion to Variant type fails with:
> ```
> java.lang.ArithmeticException: BigInteger would overflow supported range
>     at java.base/java.math.BigDecimal.setScale(BigDecimal.java:3000)
>     at org.apache.spark.sql.catalyst.xml.StaxXmlParser$.org$apache$spark$sql$catalyst$xml$StaxXmlParser$$appendXMLCharacterToVariant(StaxXmlParser.scala:1285)
> ```



--
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