Yalantis / Phoenix

Phoenix Pull-to-Refresh
https://yalantis.com/
Apache License 2.0
4.02k stars 920 forks source link

Create view success ,but got a TableNotFoundException when query #49

Closed adiaixin closed 5 years ago

adiaixin commented 5 years ago

I create a hbase table use create 'pay_psa_info6',{NAME=>'cf'} then load data which exported from online use the shell hbase org.apache.hadoop.hbase.mapreduce.Import pay_psa_info6 /tmp/part-m-00000

scan the hbase table image

then I create view CREATE VIEW "pay_psa_info6" (pk VARCHAR PRIMARY KEY, "cf"."c" integer);

select * from pay_psa_info6; Error: ERROR 1012 (42M03): Table undefined. tableName=PAY_PSA_INFO6 (state=42M03,code=1012) org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=PAY_PSA_INFO6 at org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:577) at org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.(FromCompiler.java:391) at org.apache.phoenix.compile.FromCompiler.getResolverForQuery(FromCompiler.java:228) at org.apache.phoenix.compile.FromCompiler.getResolverForQuery(FromCompiler.java:206) at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:482) at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:456) at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:302) at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:291) at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:290) at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:283) at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1830) at sqlline.Commands.execute(Commands.java:822) at sqlline.Commands.sql(Commands.java:732) at sqlline.SqlLine.dispatch(SqlLine.java:813) at sqlline.SqlLine.begin(SqlLine.java:686) at sqlline.SqlLine.start(SqlLine.java:398) at sqlline.SqlLine.main(SqlLine.java:291)

adiaixin commented 5 years ago

hbase version 1.2.6 poenix version phoenix-4.14.1-HBase-1.2

adiaixin commented 5 years ago

OK, SELECT USE QUOTA on table name .... it'is to hard to remember the rules in the DDL,DML