Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6094

Linq4j.ConstantExpression.write crashes on special FP values

    XMLWordPrintableJSON

Details

    Description

      The following SqlOperatorTest

      f.check("SELECT CAST(10e70 AS REAL)", "REAL NOT NULL", "Infinity");
      

      crashes with the following top of stack trace:

      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)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mbudiu Mihai Budiu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: