dream heaven created PHOENIX-3388:
-------------------------------------

             Summary: Creating a view on phoenix to mapping hbase cannot query 
successly
                 Key: PHOENIX-3388
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3388
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.6.0, 4.8.1
         Environment: Centos x64
2.6.32-431.el6.x86_64
            Reporter: dream heaven


I get a compile from phoenix4.8.1 to hbase-cdh5.6.0 by update the code by 
myself.And I try to deploy it to my own test env ,it's also work 
successfully.But I have some program :
First one is that I need to use " " to create a view for a exists hbase table , 
like this:
    create view "testView" (pk varchar primary key, "info"."c" varchar);
The second is that when I execute a query,eg. 
    select * from "testView" limit 10
and then , I get the right result ,but when I execute a query with columns ,it 
cannot wok,eg.
    select * from "testView" wsg  where PK like "0,1017360,1471364716";

below is the Exception Stacks:
org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): Undefined 
column. columnName=0,1017360,1471364716
        at org.apache.phoenix.schema.PTableImpl.getColumn(PTableImpl.java:703)
        at 
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.resolveColumn(FromCompiler.java:451)
        at 
org.apache.phoenix.compile.ExpressionCompiler.resolveColumn(ExpressionCompiler.java:358)
        at 
org.apache.phoenix.compile.WhereCompiler$WhereExpressionCompiler.resolveColumn(WhereCompiler.java:181)
        at 
org.apache.phoenix.compile.WhereCompiler$WhereExpressionCompiler.visit(WhereCompiler.java:169)
        at 
org.apache.phoenix.compile.WhereCompiler$WhereExpressionCompiler.visit(WhereCompiler.java:156)
        at 
org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:56)
        at 
org.apache.phoenix.parse.CompoundParseNode.acceptChildren(CompoundParseNode.java:64)
        at org.apache.phoenix.parse.LikeParseNode.accept(LikeParseNode.java:60)
        at 
org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:130)
        at 
org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
        at 
org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:556)
        at 
org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:507)
        at 
org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:202)
        at 
org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:157)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:406)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:380)
        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:1446)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:807)
        at sqlline.SqlLine.begin(SqlLine.java:681)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:292)


By the way,I try to use any colunms ,like "testView".PK,"testView"."PK",'PK' 
and so on ...
At last ,I try to use java jdbc to get colunms,
    rset.getMetaData().getColumnName(1)
it return the string "PK".but I cannot use "PK" to get result from resultset..






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

Reply via email to