You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/26 17:14:00 UTC

[jira] [Commented] (KYLIN-3700) Quote sql identities when creating flat table

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

ASF GitHub Bot commented on KYLIN-3700:
---------------------------------------

asfgit commented on issue #362: KYLIN-3700 Quote sql identities when creating flat table
URL: https://github.com/apache/kylin/pull/362#issuecomment-441720391
 
 
   Can one of the admins verify this patch?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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)