[ https://issues.apache.org/jira/browse/PHOENIX-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
alex kamil updated PHOENIX-2268: -------------------------------- Description: this query was generated by Pentaho analyzer ("generic database" datasource), looks like phoenix syntax needs to be enhanced to work with pentaho select "FACT"."MAIL_FROM" as "c0" from (select * from EMAIL_ENRON) as "FACT" group by "FACT"."MAIL_FROM" order by CASE WHEN "FACT"."MAIL_FROM" IS NULL THEN 1 ELSE 0 END, "FACT"."MAIL_FROM" ASC; Error: ERROR 1001 (42I01): Undefined column family. familyName=FACT.null (state=42I01,code=1001) org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): Undefined column family. familyName=FACT.null at org.apache.phoenix.schema.PTableImpl.getColumnFamily(PTableImpl.java:787) at org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.resolveColumn(FromCompiler.java:361) at org.apache.phoenix.compile.ExpressionCompiler.resolveColumn(ExpressionCompiler.java:369) at org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:401) at org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:141) at org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:56) at org.apache.phoenix.compile.GroupByCompiler.compile(GroupByCompiler.java:167) at org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:525) at org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:489) at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:201) at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:158) at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:380) at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:354) at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:260) at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:255) at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:254) at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1435) Related: * PHOENIX-643 * http://jira.pentaho.com/browse/MONDRIAN-2254 * https://blogs.apache.org/phoenix/entry/olap_with_apache_phoenix_and was: this query was generated by Pentaho analyzer ("generic database" datasource), looks like phoenix syntax needs to be enhanced to work with pentaho select "FACT"."MAIL_FROM" as "c0" from (select * from EMAIL_ENRON) as "FACT" group by "FACT"."MAIL_FROM" order by CASE WHEN "FACT"."MAIL_FROM" IS NULL THEN 1 ELSE 0 END, "FACT"."MAIL_FROM" ASC; Error: ERROR 1001 (42I01): Undefined column family. familyName=FACT.null (state=42I01,code=1001) org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): Undefined column family. familyName=FACT.null at org.apache.phoenix.schema.PTableImpl.getColumnFamily(PTableImpl.java:787) at org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.resolveColumn(FromCompiler.java:361) at org.apache.phoenix.compile.ExpressionCompiler.resolveColumn(ExpressionCompiler.java:369) at org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:401) at org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:141) at org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:56) at org.apache.phoenix.compile.GroupByCompiler.compile(GroupByCompiler.java:167) at org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:525) at org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:489) at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:201) at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:158) at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:380) at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:354) at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:260) at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:255) at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:254) at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1435) Related: PHOENIX-643, http://jira.pentaho.com/browse/MONDRIAN-2254 > Pentaho BA query fails > ---------------------- > > Key: PHOENIX-2268 > URL: https://issues.apache.org/jira/browse/PHOENIX-2268 > Project: Phoenix > Issue Type: Improvement > Reporter: alex kamil > Priority: Minor > > this query was generated by Pentaho analyzer ("generic database" datasource), > looks like phoenix syntax needs to be enhanced to work with pentaho > select "FACT"."MAIL_FROM" as "c0" from (select * from EMAIL_ENRON) as "FACT" > group by "FACT"."MAIL_FROM" order by CASE WHEN "FACT"."MAIL_FROM" IS NULL > THEN 1 ELSE 0 END, "FACT"."MAIL_FROM" ASC; > Error: ERROR 1001 (42I01): Undefined column family. familyName=FACT.null > (state=42I01,code=1001) > org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): > Undefined column family. familyName=FACT.null > at org.apache.phoenix.schema.PTableImpl.getColumnFamily(PTableImpl.java:787) > at > org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.resolveColumn(FromCompiler.java:361) > at > org.apache.phoenix.compile.ExpressionCompiler.resolveColumn(ExpressionCompiler.java:369) > at > org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:401) > at > org.apache.phoenix.compile.ExpressionCompiler.visit(ExpressionCompiler.java:141) > at org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:56) > at > org.apache.phoenix.compile.GroupByCompiler.compile(GroupByCompiler.java:167) > at > org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:525) > at > org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:489) > at > org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:201) > at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:158) > at > org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:380) > at > org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:354) > at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:260) > at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:255) > at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) > at > org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:254) > at > org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1435) > Related: > * PHOENIX-643 > * http://jira.pentaho.com/browse/MONDRIAN-2254 > * https://blogs.apache.org/phoenix/entry/olap_with_apache_phoenix_and -- This message was sent by Atlassian JIRA (v6.3.4#6332)