[
https://issues.apache.org/jira/browse/CALCITE-5999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17766621#comment-17766621
]
Jiajun Xie commented on CALCITE-5999:
-------------------------------------
Fixed in
[008c553|https://github.com/apache/calcite/commit/008c553aefacbe14787f50510c660a4dd739b54e].
Thanks for the PR [~mbudiu] .
> DECIMAL literals are sometimes unparsed looking as DOUBLE literals
> ------------------------------------------------------------------
>
> Key: CALCITE-5999
> URL: https://issues.apache.org/jira/browse/CALCITE-5999
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.35.0
> Reporter: Mihai Budiu
> Priority: Minor
> Labels: pull-request-available
>
> Consider a DECIMAL literal such as "0.00000000000000001"
> When unparsed this will show up as 1E-17, which is interpreted by SQL as a
> double literal.
> The bug is in the function SqlNumericLiteral.toValue(). The function calls
> toString() on a BigDecimal value, but it should probably call toPlainString()
> instead.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)