[
https://issues.apache.org/jira/browse/DRILL-8066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17452984#comment-17452984
]
ASF GitHub Bot commented on DRILL-8066:
---------------------------------------
dzamo opened a new pull request #2393:
URL: https://github.com/apache/drill/pull/2393
# [DRILL-8066](https://issues.apache.org/jira/browse/DRILL-8066): Convert
non-finite floating point literals to string RexLiterals
## Description
When we encounter floating point literals in a query we attempt to convert
them to BigDecimal which can only handle finite floats. making queries like
this fail: `select cast('-Infinity' as float);`. This change sends non-finite
floats to Strings.
## Documentation
None.
## Testing
New unit test: TestMathFunctionsWithNanInf#testNanInfLiteralConversion
Manually run `select cast('-Infinity' as float);`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> Cannot convert non-finite floating point literals
> -------------------------------------------------
>
> Key: DRILL-8066
> URL: https://issues.apache.org/jira/browse/DRILL-8066
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.19.0
> Reporter: James Turton
> Assignee: James Turton
> Priority: Minor
> Fix For: 1.20.0
>
>
> Drill can process floating point values like -Infinity, +Infinity and NaN but
> it fails to correctly convert queries containing these values as constants
> during planning. E.g. this query produces a NumberFormatException.
>
> {code:java}
> select cast('-Infinity' as float);{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)