Lukas Lalinsky created PHOENIX-2066:
---------------------------------------

             Summary: Query server fails to start (tries to create a column 
with no name in SYSTEM."CATALOG")
                 Key: PHOENIX-2066
                 URL: https://issues.apache.org/jira/browse/PHOENIX-2066
             Project: Phoenix
          Issue Type: Bug
            Reporter: Lukas Lalinsky


When using the latest version from git, starting the queryserver fails, because 
it tries to run an invalid SQL command on server startup.

{noformat}
2015-06-24 12:45:19,105 WARN 
org.apache.phoenix.query.ConnectionQueryServicesImpl: Add column failed due 
to:org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): 
Syntax error. Encountered "<EOF>" at line 1, column 49.
2015-06-24 12:45:19,106 INFO 
org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation: 
Closing zookeeper sessionid=0x14e1d23182d002f
2015-06-24 12:45:19,363 FATAL org.apache.phoenix.queryserver.server.Main: 
Unrecoverable service error. Shutting down.
java.lang.RuntimeException: 
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax 
error. Encountered "<EOF>" at line 1, column 49.
        at 
org.apache.phoenix.queryserver.server.PhoenixMetaFactoryImpl.create(PhoenixMetaFactoryImpl.java:73)
        at org.apache.phoenix.queryserver.server.Main.run(Main.java:203)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.phoenix.queryserver.server.Main.main(Main.java:226)
Caused by: org.apache.phoenix.exception.PhoenixParserException: ERROR 601 
(42P00): Syntax error. Encountered "<EOF>" at line 1, column 49.
        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:1097)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1178)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1228)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.addColumn(ConnectionQueryServicesImpl.java:1837)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.addColumnsIfNotExists(ConnectionQueryServicesImpl.java:1863)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.access$500(ConnectionQueryServicesImpl.java:174)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1946)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1869)
        at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1869)
        at 
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180)
        at 
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
        at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:208)
        at org.apache.calcite.avatica.jdbc.JdbcMeta.<init>(JdbcMeta.java:342)
        at 
org.apache.phoenix.queryserver.server.PhoenixMetaFactoryImpl.create(PhoenixMetaFactoryImpl.java:71)
        ... 3 more
Caused by: NoViableAltException(-1@[])
        at 
org.apache.phoenix.parse.PhoenixSQLParser.column_name(PhoenixSQLParser.java:2316)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.column_def(PhoenixSQLParser.java:3505)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.column_defs(PhoenixSQLParser.java:3430)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.alter_table_node(PhoenixSQLParser.java:3136)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:810)
        at 
org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:494)
        at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
        ... 20 more
{noformat}

The exact SQL it tries to run is this (no column name)

{noformat}
ALTER TABLE SYSTEM."CATALOG" ADD  IF NOT EXISTS
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to