From dev-return-56640-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Sat May 25 00:30:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C8FBC180671 for ; Sat, 25 May 2019 02:30:01 +0200 (CEST) Received: (qmail 27042 invoked by uid 500); 25 May 2019 00:30:01 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 27027 invoked by uid 99); 25 May 2019 00:30:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 May 2019 00:30:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 83461E2B51 for ; Sat, 25 May 2019 00:30:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3299525814 for ; Sat, 25 May 2019 00:30:00 +0000 (UTC) Date: Sat, 25 May 2019 00:30:00 +0000 (UTC) From: "Karthik Palanisamy (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-5301) Doc: Fix incorrect DDL and DML (In ARRAY Type page) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-5301?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karthik Palanisamy updated PHOENIX-5301: ---------------------------------------- Attachment: PHOENIX-5301.svn.phoenix.v1.patch > 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, array_type.md > > > 1. Remove multipart PRIMARY KEY=C2=A0constraint since this pk is defined = already.=C2=A0 > CREATE TABLE regions ( region_name VARCHAR PRIMARY KEY, zips VARCHAR ARRA= Y[10], CONSTRAINT pk PRIMARY KEY (region_name)); > Error: ERROR 510 (42889): The table already has a primary key. columnName= =3DREGION_NAME (state=3D42889,code=3D510) > java.sql.SQLException: ERROR 510 (42889): The table already has a primary= key. columnName=3DREGION_NAME > =C2=A0 > =C2=A0 > 2.=C2=A0 DML failed because undefined column "zip" is used.=C2=A0 Use "zi= ps", instead. > SELECT zip[1] FROM regions WHERE region_name =3D 'SF Bay Area'; > SELECT region_name FROM regions WHERE zip[1] =3D '94030' OR zip[2] =3D '9= 4030' OR zip[3] =3D '94030'; > .. > Error: ERROR 504 (42703): Undefined column. columnName=3DREGIONS.ZIP (sta= te=3D42703,code=3D504) > org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): Und= efined column. columnName=3DREGIONS.ZIP -- This message was sent by Atlassian JIRA (v7.6.3#76005)