[
https://issues.apache.org/jira/browse/KYLIN-3700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16701476#comment-16701476
]
ASF subversion and git services commented on KYLIN-3700:
--------------------------------------------------------
Commit 4158d7b3b56cbeb3c10ec5c091c23334131616a5 in kylin's branch
refs/heads/master from ZhengshuaiPENG
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=4158d7b ]
KYLIN-3700 Quote sql identities when creating flat table
> Quote sql identities when creating flat table
> ---------------------------------------------
>
> Key: KYLIN-3700
> URL: https://issues.apache.org/jira/browse/KYLIN-3700
> Project: Kylin
> Issue Type: Improvement
> Components: RDBMS Source
> Affects Versions: v2.5.1
> Reporter: XiaoXiang Yu
> Assignee: XiaoXiang Yu
> Priority: Major
> Fix For: v2.6.0
>
>
> *When kyin operate with different data source, DDL/DML may be broken because
> datasource has some different specific reserved keyword.*
>
> Sql identity should be quoted when:
> 1) Create flat table.
> 2) Push down to different datasource (different RDBMS has different reserved
> keyword) .
>
> {code:java}
> 2018-10-05 03:05:04,143 ERROR [pool-25-thread-2] conv.SqlConverter : Failed
> to default convert sql, will use the input: SELECT COUNT(TIME_KEY), TIME_KEY
> FROM CUBE.OPERATIONS_TIME WHERE TIME_KEY IS NOT NULL GROUP BY TIME_KEY ORDER
> BY COUNT(TIME_KEY) DESC LIMIT 10
> org.apache.calcite.sql.parser.SqlParseException: Encountered "FROM CUBE" at
> line 1, column 34.
> Was expecting one of:
> <EOF>
> "ORDER" ...
> "LIMIT" ...
> "OFFSET" ...
> "FETCH" ...
> "FROM" <IDENTIFIER> ...
> "FROM" <QUOTED_IDENTIFIER> ...
> "FROM" <BACK_QUOTED_IDENTIFIER> ...
> "FROM" <BRACKET_QUOTED_IDENTIFIER> ...
> "FROM" <UNICODE_QUOTED_IDENTIFIER> ...
> "FROM" "LATERAL" ...
> "FROM" "(" ...
> "FROM" "UNNEST" ...
> "FROM" "TABLE" ...
> "," ...
> "AS" ...
> <IDENTIFIER> ...
> <QUOTED_IDENTIFIER> ...
> <BACK_QUOTED_IDENTIFIER> ...
> <BRACKET_QUOTED_IDENTIFIER> ...
> <UNICODE_QUOTED_IDENTIFIER> ...
> "." ...
> "INTERSECT" ...
> "EXCEPT" ...
> "MINUS" ...
> "(" ...
>
> at
> org.apache.calcite.sql.parser.impl.SqlParserImpl.convertException(SqlParserImpl.java:349)
> at
> org.apache.calcite.sql.parser.impl.SqlParserImpl.normalizeException(SqlParserImpl.java:130){code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)