Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of column names quoting in Phoenix connector's underlying queries #3466

Closed
findepi opened this issue Apr 17, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Apr 17, 2020

CREATE TABLE t("column-with-hyphen" varchar);

SELECT "column-with-hyphen" FROM t

2020-04-17T11:12:45.7820921Z Caused by: org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered "-" at line 1, column 110.
2020-04-17T11:12:45.7824069Z 	at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
2020-04-17T11:12:45.7826666Z 	at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
2020-04-17T11:12:45.7829968Z 	at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1644)
2020-04-17T11:12:45.7832746Z 	at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1727)
2020-04-17T11:12:45.7835428Z 	at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1819)
2020-04-17T11:12:45.7837960Z 	at io.prestosql.plugin.jdbc.BaseJdbcClient.execute(BaseJdbcClient.java:824)
2020-04-17T11:12:45.7839196Z 	... 16 more
2020-04-17T11:12:45.7841684Z Caused by: org.apache.phoenix.shaded.org.antlr.runtime.NoViableAltException
2020-04-17T11:12:45.7844612Z 	at org.apache.phoenix.parse.PhoenixSQLParser.column_name(PhoenixSQLParser.java:2966)
2020-04-17T11:12:45.7847892Z 	at org.apache.phoenix.parse.PhoenixSQLParser.column_def(PhoenixSQLParser.java:4458)
2020-04-17T11:12:45.7850839Z 	at org.apache.phoenix.parse.PhoenixSQLParser.column_defs(PhoenixSQLParser.java:4404)
2020-04-17T11:12:45.7884303Z 	at org.apache.phoenix.parse.PhoenixSQLParser.create_table_node(PhoenixSQLParser.java:1236)
2020-04-17T11:12:45.7884460Z 	at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:868)
2020-04-17T11:12:45.7884736Z 	at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:524)
2020-04-17T11:12:45.7884883Z 	at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
2020-04-17T11:12:45.7884995Z 	... 20 more
@ebyhr
Copy link
Member

ebyhr commented Dec 29, 2020

Going to close this issue since fixed by #3601

@ebyhr ebyhr closed this as completed Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants