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

Mihai Budiu commented on CALCITE-7866:
--------------------------------------

I have a fix, but it will conflict with  CALCITE-7865 so I will wait for that 
one to be merged first.

> 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
>            Priority: Minor
>
> 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