[ 
https://issues.apache.org/jira/browse/PHOENIX-5584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16980846#comment-16980846
 ] 

Lars Hofhansl commented on PHOENIX-5584:
----------------------------------------

Found another problem too:

If you add a column to the view with the new client then the old client will 
throw an exception:
{code:java}
 Error: java.lang.ArrayIndexOutOfBoundsException: 6 (state=,code=0)
java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException: 6
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1466)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1428)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.getTable(ConnectionQueryServicesImpl.java:1645)
        at 
org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:645)
        at 
org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:539)
        at 
org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:573)
        at 
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.<init>(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:485)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:459)
        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:1834)
        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)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 6
        at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:517)
        at 
org.apache.phoenix.schema.PTableImpl.createFromProto(PTableImpl.java:1358)
        at 
org.apache.phoenix.coprocessor.MetaDataProtocol$MetaDataMutationResult.constructFromProto(MetaDataProtocol.java:355)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1458)
        ... 22 more
{code}

> old client can't get right view metadata when 4.15 client created view
> ----------------------------------------------------------------------
>
>                 Key: PHOENIX-5584
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5584
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.15.0, 5.1.0
>            Reporter: Xinyi Yan
>            Assignee: Chinmay Kulkarni
>            Priority: Blocker
>             Fix For: 4.15.0, 5.1.0
>
>
> To reproduce this bug locally:
>  1. start the sandbox at 4.15.
>  2. created table and view at 4.15 client.
> {code:java}
> CREATE TABLE AAA (A BIGINT PRIMARY KEY, B BIGINT);
> CREATE VIEW A_VIEW AS SELECT * FROM AAA;
> {code}
> 3. query `SELECT * FROM A_VIEW` at 4.14 client.
> {code:java}
> 0: jdbc:phoenix:localhost:51070> SELECT * FROM A_VIEW;
> +--+
> |  |
> +--+
> +--+
> No rows selected (0.009 seconds)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to