[ 
https://issues.apache.org/jira/browse/CALCITE-4462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17439418#comment-17439418
 ] 

Julian Hyde commented on CALCITE-4462:
--------------------------------------

I don't think has changed on this issue or 4589 (which is very closely related).

What was the SQL that caused this issue? (I am curious how the Inf or NaN 
values entered the system, since SQL doesn't officially allow them.)

I think the solution would involve some clean way to create Inf and NaN values 
via SQL syntax. Perhaps add some functions to create those values.

> `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.25.0, 1.26.0
>            Reporter: Yuriy Sazonets
>            Priority: Major
>
> Should return original value instead of throwing an exception.
> h4. Stack trace
> {noformat}
> 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)
> {noformat}



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

Reply via email to