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

`ROUND` SQL function throws exception on Infinite or NaN arguments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.25.0, 1.26.0
    • None
    • core
    • None

    Description

      Should return original value instead of throwing an exception.

      Stack trace

      java.lang.NumberFormatException: Character I is neither a decimal digit number, decimal point, nor "e" notation exponential
      
      mark.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:519)
      at java.base/java.math.BigDecimal.<init>(BigDecimal.java:402)
      at java.base/java.math.BigDecimal.<init>(BigDecimal.java:835)
      at java.base/java.math.BigDecimal.valueOf(BigDecimal.java:1305)
      at org.apache.calcite.runtime.SqlFunctions.sround(SqlFunctions.java:1535)
      at Baz$8$1.current(Unknown Source) at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:684)
      at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
      at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:217)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ysazonets Yuriy Sazonets
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: