I've gotten started with Apache Phoenix by creating some tables and running some queries. Mostly, I've noticed that Phoenix will uppercase the column names. However, I have one table with lowercase column names; it is named 'shapes':
[image: image.png] I am able to run select * queries against it, but I am unable to query any of the columns: [image: image.png] 0: jdbc:phoenix:> select shape from shapes; > > *Error: ERROR 504 (42703): Undefined column. columnName=SHAPE > (state=42703,code=504)*org.apache.phoenix.schema.ColumnNotFoundException: > ERROR 504 (42703): Undefined column. columnName=SHAPE > at org.apache.phoenix.schema.PTableImpl.getColumn(PTableImpl.java:665) > at org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver. > resolveColumn(FromCompiler.java:451) > at org.apache.phoenix.compile.TupleProjectionCompiler$ > ColumnRefVisitor.visit(TupleProjectionCompiler.java:202) > at org.apache.phoenix.compile.TupleProjectionCompiler$ > ColumnRefVisitor.visit(TupleProjectionCompiler.java:188) > at org.apache.phoenix.parse.ColumnParseNode.accept( > ColumnParseNode.java:56) > at org.apache.phoenix.compile.TupleProjectionCompiler. > createProjectedTable(TupleProjectionCompiler.java:107) > at org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery( > QueryCompiler.java:525) > at org.apache.phoenix.compile.QueryCompiler.compileSingleQuery( > QueryCompiler.java:504) > at org.apache.phoenix.compile.QueryCompiler.compileSelect( > QueryCompiler.java:199) > at org.apache.phoenix.compile.QueryCompiler.compile( > QueryCompiler.java:154) > at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement. > compilePlan(PhoenixStatement.java:404) > at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement. > compilePlan(PhoenixStatement.java:378) > at org.apache.phoenix.jdbc.PhoenixStatement$1.call( > PhoenixStatement.java:271) > at org.apache.phoenix.jdbc.PhoenixStatement$1.call( > PhoenixStatement.java:266) > at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) > at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery( > PhoenixStatement.java:265) > at org.apache.phoenix.jdbc.PhoenixStatement.execute( > PhoenixStatement.java:1444) > 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) Note that I am using phoenix-sqlline, which runs with the following client: /usr/hdp/2.6.5.0-292/phoenix/phoenix-4.7.0.2.6.5.0-292-client.jar It seems like this 'shapes' table with lowercase columns is problematic and can not be queried regardless of the casing of my query. I am unable to create new tables similar to this existing 'shapes' table, since any new tables that I attempt to create result in columns with upper case columns. Any help or insight into this issue would be appreciated. Regards, Ali Anwar