You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2014/10/27 22:19:34 UTC

[jira] [Commented] (PHOENIX-1385) Adding, dropping and adding columns fails with NPE

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

Hudson commented on PHOENIX-1385:
---------------------------------

SUCCESS: Integrated in Phoenix | 3.0 | Hadoop1 #290 (See [https://builds.apache.org/job/Phoenix-3.0-hadoop1/290/])
PHOENIX-1385 Adding, dropping and adding columns fails with NPE (Samarth Jain, James Taylor) (jtaylor: rev 2681601164441f6868e8472c40ed461cdac32c36)
* phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
* phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
* phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
* phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/PMetaDataImpl.java
* phoenix-core/src/main/java/org/apache/phoenix/query/MetaDataMutated.java
* phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java


> Adding, dropping and adding columns fails with NPE
> --------------------------------------------------
>
>                 Key: PHOENIX-1385
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1385
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.1
>            Reporter: Samarth Jain
>            Assignee: James Taylor
>             Fix For: 5.0.0, 4.2, 3.2
>
>         Attachments: PHOENIX-1385.patch
>
>
> {code}
> @Test
>     public void testAddColumnsUsingNewConnection() throws Exception {
>     	Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
>         String ddl = "CREATE TABLE T (\n"
>         	    +"ID1 VARCHAR(15) NOT NULL,\n"
>         	    +"ID2 VARCHAR(15) NOT NULL,\n"
>         	    +"CREATED_DATE DATE,\n"
>         	    +"CREATION_TIME BIGINT,\n"
>         	    +"LAST_USED DATE,\n"
>         	    +"CONSTRAINT PK PRIMARY KEY (ID1, ID2))";
>         Connection conn1 = DriverManager.getConnection(getUrl(), props);
>         conn1.createStatement().execute(ddl);
>         ddl = "ALTER TABLE T ADD STRING VARCHAR, STRING_DATA_TYPES VARCHAR";
>         conn1.createStatement().execute(ddl);
>         ddl = "ALTER TABLE T DROP COLUMN STRING, STRING_DATA_TYPES";
>         conn1.createStatement().execute(ddl);
>         ddl = "ALTER TABLE T ADD STRING_ARRAY1 VARCHAR[]";
>         conn1.createStatement().execute(ddl);
>         conn1.close();
>     }
> Exception:
> java.lang.NullPointerException: at index 6
> 	at com.google.common.collect.ImmutableList.checkElementNotNull(ImmutableList.java:311)
> 	at com.google.common.collect.ImmutableList.construct(ImmutableList.java:302)
> 	at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:278)
> 	at org.apache.phoenix.schema.PTableImpl.init(PTableImpl.java:338)
> 	at org.apache.phoenix.schema.PTableImpl.<init>(PTableImpl.java:246)
> 	at org.apache.phoenix.schema.PTableImpl.makePTable(PTableImpl.java:205)
> 	at org.apache.phoenix.schema.PMetaDataImpl.addColumn(PMetaDataImpl.java:315)
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl$1.mutate(ConnectionQueryServicesImpl.java:495)
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataMutated(ConnectionQueryServicesImpl.java:459)
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl.addColumn(ConnectionQueryServicesImpl.java:491)
> 	at org.apache.phoenix.jdbc.PhoenixConnection.addColumn(PhoenixConnection.java:732)
> 	at org.apache.phoenix.schema.MetaDataClient.addColumn(MetaDataClient.java:2073)
> 	at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableAddColumnStatement$1.execute(PhoenixStatement.java:750)
> 	at org.apache.phoenix.jdbc.PhoenixStatement$3.call(PhoenixStatement.java:260)
> 	at org.apache.phoenix.jdbc.PhoenixStatement$3.call(PhoenixStatement.java:1)
> 	at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:251)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1037)
> 	at org.apache.phoenix.end2end.AlterTableIT.testAddColumnsUsingNewConnection(AlterTableIT.java:913)
> {code}



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