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

Vincent Tran commented on IMPALA-12450:
---------------------------------------

While the documentation correctly categorizes reservedWords in Impala per 
sql-scanner.flex, it does not indicate that there are undocumented keywords 
that are treated as reserved words by Impala.


{noformat}
[nightly-7x-lu-3.nightly-7x-lu.root.hwx.site:21050] default> create table 
enable (c1 int);
Query: create table enable (c1 int)
ERROR: ParseException: Syntax error in line 1:
create table enable (c1 int)
             ^
Encountered: ENABLE
Expected: DEFAULT, IF, IDENTIFIER

CAUSED BY: Exception: Syntax error

[nightly-7x-lu-3.nightly-7x-lu.root.hwx.site:21050] default> create table table 
(c1 int);
Query: create table table (c1 int)
ERROR: ParseException: Syntax error in line 1:
create table table (c1 int)
             ^
Encountered: TABLE
Expected: DEFAULT, IF, IDENTIFIER

CAUSED BY: Exception: Syntax error

[nightly-7x-lu-3.nightly-7x-lu.root.hwx.site:21050] default> create table && 
(c1 int);
Query: create table && (c1 int)
ERROR: ParseException: Syntax error in line 1:
create table && (c1 int)
             ^
Encountered: AND
Expected: DEFAULT, IF, IDENTIFIER

CAUSED BY: Exception: Syntax error

[nightly-7x-lu-3.nightly-7x-lu.root.hwx.site:21050] default> create table `&&` 
(c1 int);
Query: create table `&&` (c1 int)
ERROR: AnalysisException: Invalid table/view name: &&

[nightly-7x-lu-3.nightly-7x-lu.root.hwx.site:21050] default> create table `abs` 
(c1 int);
Query: create table `abs` (c1 int)
+-------------------------+
| summary                 |
+-------------------------+
| Table has been created. |
+-------------------------+
Fetched 1 row(s) in 0.21s
[nightly-7x-lu-3.nightly-7x-lu.root.hwx.site:21050] default>

{noformat}

So I think the documentation could expand the table to include all keywords in 
keywordMap.


> Document "enable" as a reserved keyword
> ---------------------------------------
>
>                 Key: IMPALA-12450
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12450
>             Project: IMPALA
>          Issue Type: Task
>          Components: Docs
>            Reporter: Manish Maheshwari
>            Priority: Major
>
> Update - 
> [https://impala.apache.org/docs/build/html/topics/impala_reserved_words.html] 
> to add "enable" keyword.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to