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

Mihai Budiu commented on CALCITE-3522:
--------------------------------------

This code has nothing to do with predicates, it just modifies the constructor 
of SqlNumericLiteral to accept large values. So it should be very general.

I suspect that in the case you are mentioning there is another problem besides 
this bug. The easiest way to diagnose your problem would be to file an issue 
with enough detail to reproduce the problem you are having.

Please note that the data types in Calcite are controlled by a type system 
(RelDataTypeSystem), which has a few configurable knobs. The default type 
system allows a precision of maximum 38 for decimals. So if you don't change 
the type system in your project you won't get wider values.

> Sql validator limits decimal literals to 64 bits
> ------------------------------------------------
>
>                 Key: CALCITE-3522
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3522
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.18.0, 1.36.0
>            Reporter: Changbo Shu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.38.0
>
>         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