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

Mihai Budiu resolved CALCITE-7866.
----------------------------------
    Fix Version/s: 1.43.0
       Resolution: Fixed

Fixed in 
[https://github.com/apache/calcite/commit/8c3770b22dfeab8f3a22e0352ba030fd3eb78382]

Thank you for the review [~xuzifu666] 

> CASTS from string values accept Java idioms which are not legal in SQL
> ----------------------------------------------------------------------
>
>                 Key: CALCITE-7866
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7866
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> The Calcite runtime uses Java to parse values when converting strings to 
> other types. As a result, the runtime accepts Java constructs which are not 
> legal in SQL. Examples:
>  
> ||Cast||String||Java rule that accepts it||Constant||
> |DOUBLE, REAL|{{{}'1.5d'{}}}, {{'1.5f'}}|type suffix on a Java number|1.5|
> |DOUBLE, REAL|{{'0x1p3'}}|hexadecimal floating-point number|8.0|
> |INT types|{{'٧'}} (U+0667, Arabic-Indic 7)|{{Character.digit}} accepts any 
> Unicode digit|7|
> |BOOLEAN|{{'falſe'}} (U+017F, long s)|{{equalsIgnoreCase}} upper-cases {{ſ}} 
> to {{S}}|FALSE|



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

Reply via email to