[
https://issues.apache.org/jira/browse/CALCITE-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16271598#comment-16271598
]
Volodymyr Tkach commented on CALCITE-2067:
------------------------------------------
Ok, will do that for SQL grammar, parser, validator, and operator
implementations as well.
As for:
??I don't feel comfortable allowing Double values in
RexLiteral.valueMatchesType. A lot of code relies upon the value being a
BigDecimal.??
If it can potentially cause some problems, maybe we should instead add
separate Calcite type for NaN, Infinity values, and don't change existing
logic of Calcite's `DOUBLE`? Right now the only thing we can do is to check
for both: `Double` and `BigDecimal` in `valueMatchesType` methods.
> RexBuilder can't handle NaN,Infinity double constants
> -----------------------------------------------------
>
> Key: CALCITE-2067
> URL: https://issues.apache.org/jira/browse/CALCITE-2067
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.13.0
> Reporter: Volodymyr Tkach
> Assignee: Julian Hyde
>
> Currently we are working in Drill to allow support for Nan an Infinity values
> .
> When using such values with functions we see the NumberFormatException
> exception.
> Query example: _select sin(cast('NaN' as float))_
> RexBuilder#clean and other RexBuilder's methods use BigDecimal for handling
> Double values, that's why we get NumberFormatException for nan,inf values.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)