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

Julian Hyde commented on CALCITE-3522:
--------------------------------------

I don't think you can just remove the checks. If you do that then some 
implementations (e.g. those that map DECIMAL values to 64-bit scaled integers) 
will give incorrect results.

> sql validator limits decimal literals to 64 bits
> ------------------------------------------------
>
>                 Key: CALCITE-3522
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3522
>             Project: Calcite
>          Issue Type: Test
>          Components: core
>    Affects Versions: 1.18.0
>            Reporter: Changbo Shu
>            Priority: Minor
>         Attachments: code.png
>
>
> [https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L2983]
> for example:
> create table tbl(f1 double),
> f1 stores a double's max value. (1.7976931348623157E308)
> long max value isĀ 9223372036854775807.
> select * from table where f1=value, if value is greater than long max, 
> sqlvalidator will throw out of range exception.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to