You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2026/10/18 00:24:00 UTC
[jira] [Created] (CALCITE-7866) CASTS from string values accept Java idioms which are not legal in SQL
Mihai Budiu created CALCITE-7866:
------------------------------------
Summary: 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
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)