Mihai Budiu created CALCITE-6094:
------------------------------------

             Summary: lin4j.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


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)

Reply via email to