[ 
https://issues.apache.org/jira/browse/CALCITE-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

shuchangbo updated CALCITE-3522:
--------------------------------
    Description: 
[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L2983|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java]

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.

  was:
[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java]

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.


> sql validator limits decimal and long have the same precision, so the 
> unscaled value of a decimal must fit into a long
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-3522
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3522
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: shuchangbo
>            Priority: Minor
>         Attachments: code.png
>
>
> [https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L2983|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java]
> 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.3.4#803005)

Reply via email to