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

Hudson commented on PHOENIX-930:
--------------------------------

SUCCESS: Integrated in Jenkins build Phoenix-master #1368 (See 
[https://builds.apache.org/job/Phoenix-master/1368/])
PHOENIX-930 duplicated columns cause query exception and drop table 
(jamestaylor: rev b36bb31fe42cb7bf5b6de5bfab63bcad424998a4)
* (edit) phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
* (edit) 
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexMetadataIT.java
* (add) 
phoenix-core/src/test/java/org/apache/phoenix/compile/CreateTableCompilerTest.java


> duplicated columns cause query exception and drop table exception
> -----------------------------------------------------------------
>
>                 Key: PHOENIX-930
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-930
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: wangkai
>            Assignee: Junegunn Choi
>             Fix For: 4.8.1
>
>         Attachments: PHOENIX-930, PHOENIX-930-v2.patch, PHOENIX-930-v3.patch, 
> PHOENIX-930.patch, PHOENIX-930_v4.patch, PHOENIX-930_v5.patch
>
>
> when I create table like this: "create table test (id varchar not null 
> primary key, f.name varchar, f.email varchar, f.email varchar)", this will 
> cause an org.apache.phoenix.schema.ColumnAlreadyExistsException, but the 
> table is successful created.
> Then I run a query like "select * from test", an exception is threw:
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
>         at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:283)
>         at org.apache.phoenix.schema.PTableImpl.<init>(PTableImpl.java:216)
>         at 
> org.apache.phoenix.schema.PTableImpl.makePTable(PTableImpl.java:209)
>         at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:443)
>         at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.buildTable(MetaDataEndpointImpl.java:254)
>         at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.doGetTable(MetaDataEndpointImpl.java:1077)
>         at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:1023)
>         ... 10 more
> then I try to drop the table: "drop table test", an exception is also threw:
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
>         at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:283)
>         at org.apache.phoenix.schema.PTableImpl.<init>(PTableImpl.java:216)
>         at 
> org.apache.phoenix.schema.PTableImpl.makePTable(PTableImpl.java:209)
>         at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:443)
>         at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.buildTable(MetaDataEndpointImpl.java:254)
>         at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.doGetTable(MetaDataEndpointImpl.java:1077)
>         at 
> org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:1023)
>         ... 10 more
> So I have to drop SYSTEM.CATALOG, SYSTEM.SEQUENCE from hbase shell……
> The ArrayIndexOutOfBoundsException is threw out because the position of 
> f.email column in CATALOG table is not correct. I think it's better to check  
> columns before creating table.



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

Reply via email to