Hi,

Thank you for sharing the link for the list of keywords.
Earlier I visited this page for the keywords but there is no word ‘Active’
It would be great If it can be added to the phoenix documentation page.

-Dharmesh

From: Divya Gehlot [mailto:[email protected]]
Sent: Thursday, July 28, 2016 3:41 PM
To: user <[email protected]>
Subject: Re: List of keywords/Tokens not allowed in Phoenix

https://phoenix.apache.org/language/<https://urldefense.proofpoint.com/v2/url?u=https-3A__phoenix.apache.org_language_&d=CwMFaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=EGezjlpg2tnXuxy97Hkl-w&m=bdmpOk5kgDnBTZhbaoA15xtxBXLMqK161ZS013oedCI&s=Ux5e3rxBsfZS72V0ks1xd7nS6mFksxYmcLyg8OSkW6A&e=>

On 28 July 2016 at 14:19, Dharmesh Guna 
<[email protected]<mailto:[email protected]>> wrote:
Dear All,

While running below query to create a table I encountered an error. Is there 
any list of tokens/keywords that we cannot use as column name in Phoenix?
CREATE TABLE TTEST (ACTIVE BIGINT PRIMARY KEY, AC VARCHAR);

Error Message:

Error: Error -1 (00000) : Error while executing SQL "create table ttest (Active 
BIGINT PRIMARY KEY, AC VARCHAR)": Remote driver error: RuntimeException: 
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax 
error. Encountered "Active" at line 1, column 21. -> PhoenixParserException: 
ERROR 601 (42P00): Syntax error. Encountered "Active" at line 1, column 21. -> 
NoViableAltException: (null exception message) (state=00000,code=-1)
org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : Error while 
executing SQL "create table ttest (Active BIGINT PRIMARY KEY, AC VARCHAR)": 
Remote driver error: RuntimeException: 
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax 
error. Encountered "Active" at line 1, column 21. -> PhoenixParserException: 
ERROR 601 (42P00): Syntax error. Encountered "Active" at line 1, column 21. -> 
NoViableAltException: (null exception message)
        at org.apache.calcite.avatica.Helper.createException(Helper.java:53)
        at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
        at 
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:143)
        at 
org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:177)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:808)
        at sqlline.SqlLine.begin(SqlLine.java:681)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:292)
java.lang.RuntimeException: 
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax 
error. Encountered "Active" at line 1, column 21.
        at org.apache.calcite.avatica.jdbc.JdbcMeta.propagate(JdbcMeta.java:651)
        at 
org.apache.calcite.avatica.jdbc.JdbcMeta.prepareAndExecute(JdbcMeta.java:715)
        at 
org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:186)
        at 
org.apache.calcite.avatica.remote.Service$PrepareAndExecuteRequest.accept(Service.java:868)
        at 
org.apache.calcite.avatica.remote.Service$PrepareAndExecuteRequest.accept(Service.java:842)
        at 
org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:102)
        at 
org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:38)
        at 
org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:68)
        at 
org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
        at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:497)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245)
        at 
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.phoenix.exception.PhoenixParserException: ERROR 601 
(42P00): Syntax error. Encountered "Active" at line 1, column 21.
        at 
org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
        at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1185)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1268)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1339)
        at 
org.apache.calcite.avatica.jdbc.JdbcMeta.prepareAndExecute(JdbcMeta.java:695)
        ... 15 more
Caused by: NoViableAltException(4@[])
        at 
org.apache.phoenix.parse.PhoenixSQLParser.column_name(PhoenixSQLParser.java:2448)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.column_def(PhoenixSQLParser.java:3758)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.column_defs(PhoenixSQLParser.java:3682)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.create_table_node(PhoenixSQLParser.java:1054)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:793)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:500)
        at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
        ... 19 more

Thank you!!

Regards,
:: Dharmesh Guna
:: Development | Custom Reports
:: Contact | 961.199.87.52 |  Ext. | 130 3264


Reply via email to