You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2014/07/28 22:57:38 UTC
[jira] [Commented] (DRILL-1215) "position" is treated a key word in
Drill
[ https://issues.apache.org/jira/browse/DRILL-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14076831#comment-14076831 ]
Julian Hyde commented on DRILL-1215:
------------------------------------
It's a built-in function defined by the SQL standard.
{code:sql}
0: jdbc:optiq:model=foodbench.json> values position('cd' in 'abcdef');
+------------+
| EXPR$0 |
+------------+
| 3 |
+------------+
1 row selected (0.043 seconds)
{code}
> "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)