drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chun Chang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1215) "position" is treated a key word in Drill
Date Wed, 06 Aug 2014 16:57:11 GMT

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

Chun Chang commented on DRILL-1215:
-----------------------------------

maybe position() is and 'position' itself is not? I can see 'position' being used for table
name, and perhaps more likely column name. treat it as key word probably should be avoided.
I wonder how postgres made it non-key word, and it seems makes sense.

> "position" is treated a key word in Drill
> -----------------------------------------
>
>                 Key: DRILL-1215
>                 URL: https://issues.apache.org/jira/browse/DRILL-1215
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>            Reporter: Chun Chang
>             Fix For: 0.5.0
>
>
> #Mon Jul 28 09:59:48 PDT 2014
> git.commit.id.abbrev=caa8b78
> Have a table named "position". It appears Drill (optiq) treats "position" as a key word.
Should we? 
> Drill:
> 0: jdbc:drill:schema=dfs> select * from position;
> Query failed: Failure while parsing sql. Encountered "position" at line 1, column 15.
> Was expecting one of:
>     <IDENTIFIER> ...
>     <QUOTED_IDENTIFIER> ...
>     <BACK_QUOTED_IDENTIFIER> ...
>     <BRACKET_QUOTED_IDENTIFIER> ...
>     <UNICODE_QUOTED_IDENTIFIER> ...
>     "LATERAL" ...
>     "(" ...
>     "UNNEST" ...
>     "TABLE" ...
>      [6167fa53-8ef0-49f1-94e1-30c012d388c4]
> Error: exception while executing query (state=,code=0)
> 0: jdbc:drill:schema=dfs> select * from `position`;
> +-------------+----------------+------------+------------+------------+-----------------+
> | position_id | position_title |  pay_type  | min_scale  | max_scale  | management_role
|
> +-------------+----------------+------------+------------+------------+-----------------+
> | 1           | [B@7dd20419    | [B@670b45d7 | 25000.0    | 85000.0    | [B@15165b1b
    |
> postgres:
> foodmart=# select * from position;
>  position_id |      position_title       | pay_type | min_scale  | max_scale  |    management_role
> -------------+---------------------------+----------+------------+------------+-----------------------
>            1 | President                 | Monthly  | 25000.0000 | 85000.0000 | Senior
Management



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message