[
https://issues.apache.org/jira/browse/PHOENIX-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16882605#comment-16882605
]
Ankit Singhal commented on PHOENIX-5301:
----------------------------------------
[~swaroopa], it seems you have already committed it, can you please resolve the
JIRA if it was complete. Thanks.
{code}
r1860865 | skadam | 2019-06-08 15:17:46 -0700 (Sat, 08 Jun 2019) | 1 line
Doc: Fix incorrect DDL and DML (In ARRAY Type page) (Karthik Palanisamy)
{code}
> Doc: Fix incorrect DDL and DML (In ARRAY Type page)
> ---------------------------------------------------
>
> Key: PHOENIX-5301
> URL: https://issues.apache.org/jira/browse/PHOENIX-5301
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 5.0.0
> Reporter: Karthik Palanisamy
> Assignee: Karthik Palanisamy
> Priority: Minor
> Attachments: PHOENIX-5301.svn.phoenix.v1.patch,
> PHOENIX-5301.svn.phoenix.v2.patch, array_type.md
>
>
> 1. Remove multipart PRIMARY KEY constraint since this pk is defined already.
> CREATE TABLE regions ( region_name VARCHAR PRIMARY KEY, zips VARCHAR
> ARRAY[10], CONSTRAINT pk PRIMARY KEY (region_name));
> Error: ERROR 510 (42889): The table already has a primary key.
> columnName=REGION_NAME (state=42889,code=510)
> java.sql.SQLException: ERROR 510 (42889): The table already has a primary
> key. columnName=REGION_NAME
>
>
> 2. DML failed because undefined column "zip" is used. Use "zips", instead.
> SELECT zip[1] FROM regions WHERE region_name = 'SF Bay Area';
> SELECT region_name FROM regions WHERE zip[1] = '94030' OR zip[2] = '94030' OR
> zip[3] = '94030';
> ..
> Error: ERROR 504 (42703): Undefined column. columnName=REGIONS.ZIP
> (state=42703,code=504)
> org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703):
> Undefined column. columnName=REGIONS.ZIP
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)