Yuriy Sazonets created CALCITE-4462:
---------------------------------------

             Summary: `ROUND` SQL function throws exception on Infinite or NaN 
arguments
                 Key: CALCITE-4462
                 URL: https://issues.apache.org/jira/browse/CALCITE-4462
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.26.0, 1.25.0
            Reporter: Yuriy Sazonets


Should return original value instead of throwing an exception.
h4. 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)}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to