Chun Chang created DRILL-1215:
---------------------------------

             Summary: "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


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

Reply via email to