You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2024/01/11 21:51:00 UTC

[jira] [Resolved] (CALCITE-6094) Linq4j.ConstantExpression.write crashes on special FP values

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

Mihai Budiu resolved CALCITE-6094.
----------------------------------
    Fix Version/s: 1.37.0
       Resolution: Fixed

Fixed by https://github.com/apache/calcite/commit/ad2a4e6af21ab27952c7152e670783559e49735e

> Linq4j.ConstantExpression.write crashes on special FP values
> ------------------------------------------------------------
>
>                 Key: CALCITE-6094
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6094
>             Project: Calcite
>          Issue Type: Bug
>          Components: linq4j
>    Affects Versions: 1.35.0
>            Reporter: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.37.0
>
>
> The following SqlOperatorTest 
> {code:java}
> f.check("SELECT CAST(10e70 AS REAL)", "REAL NOT NULL", "Infinity");
> {code}
> crashes with the following top of stack trace:
> {code}
> Caused by: java.lang.NumberFormatException: Character I is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
> 	at java.base/java.math.BigDecimal.<init>(BigDecimal.java:522)
> 	at java.base/java.math.BigDecimal.<init>(BigDecimal.java:405)
> 	at java.base/java.math.BigDecimal.<init>(BigDecimal.java:838)
> 	at java.base/java.math.BigDecimal.valueOf(BigDecimal.java:1318)
> 	at org.apache.calcite.linq4j.tree.ConstantExpression.write(ConstantExpression.java:109)
> 	at org.apache.calcite.linq4j.tree.ConstantExpression.accept(ConstantExpression.java:77)
> {code}



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