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

Hudson commented on PHOENIX-989:
--------------------------------

FAILURE: Integrated in Phoenix-master-hadoop2 #4 (See 
[https://builds.apache.org/job/Phoenix-master-hadoop2/4/])
Phoenix-989-problem setting column type of Array to null (ramkrishna: rev 
1636b2c8f4662054f71ee80625241f570078fb1a)
* phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/PDataType.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/PArrayDataType.java


> problem setting column type of Array to null
> --------------------------------------------
>
>                 Key: PHOENIX-989
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-989
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 3.0-Release
>            Reporter: Jody Landreneau
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 3.1, 4.1
>
>         Attachments: HBASE-989.patch, HBASE-989_1.patch, Phoenix-989_1.patch
>
>
> Phoenix throws error when setting null for an array column type.
> Example:
> CREATE TABLE regions (
> region_name VARCHAR NOT NULL,
> nullable_field VARCHAR,
> zips VARCHAR[]
> CONSTRAINT pk PRIMARY KEY (region_name));
> I can
> UPSERT INTO regions(region_name, nullable_field)
> VALUES('SF Bay Area', null)
> but not
> UPSERT INTO regions(region_name, nullable_field, zips)
> VALUES('SF Bay Area', 'one', null)
> I have the same issue attempting to use jdbc, when I call the 
> PreparedStatement's
> setNull(int parameterIndex, int sqlType) and I set the sqlType to ARRAY.
> Seems that the error I get is
> java.lang.NullPointerException
> at org.apache.phoenix.schema.PDataType$27.isCoercibleTo(PDataType.java:3455)
> at 
> org.apache.phoenix.compile.UpsertCompiler$3.execute(UpsertCompiler.java:695)
> at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:226)
> at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:185)
> at 
> org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:146)
> at 
> org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:151)
> The expectation is that I should be able to set array column types to null.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to