Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.34.0
Description
MySQL support identifier starting with number, which is without any quoting.
- test case
@Test void testIdentifierStartWithNumber() { final String sql = "select 1_c1 from (select deptno as 1_c1 from emp)"; sql(sql).ok(); }
- Exception
java.lang.RuntimeException:
org.apache.calcite.sql.parser.SqlParseException: Encountered "1" at line 1,
column 36.
Was expecting one of:
<QUOTED_STRING> ...
<BRACKET_QUOTED_IDENTIFIER> ...
<QUOTED_IDENTIFIER> ...
<BACK_QUOTED_IDENTIFIER> ...
<BIG_QUERY_BACK_QUOTED_IDENTIFIER> ...
<HYPHENATED_IDENTIFIER> ...
<IDENTIFIER> ...
<UNICODE_QUOTED_IDENTIFIER> ...
at
org.apache.calcite.sql.parser.SqlParseException.writeReplace(SqlParseException.java:171)
As discuss of email's group: https://lists.apache.org/thread/yj905ht2t2gwnndgyw5ks8nh0nftlyoo
We could support it in babel's parser.
Attachments
Issue Links
- is related to
-
CALCITE-5668 When parsing SQL in PostgreSQL dialect, allow unquoted table names to contain dollar sign, letters with diacritical marks and non-Latin letters
- Closed
- links to