Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95B6617C4D for ; Sat, 7 Mar 2015 06:56:58 +0000 (UTC) Received: (qmail 75587 invoked by uid 500); 7 Mar 2015 06:56:58 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 75534 invoked by uid 500); 7 Mar 2015 06:56:58 -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 75520 invoked by uid 99); 7 Mar 2015 06:56:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Mar 2015 06:56:58 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ndimiduk@gmail.com designates 209.85.212.172 as permitted sender) Received: from [209.85.212.172] (HELO mail-wi0-f172.google.com) (209.85.212.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Mar 2015 06:56:32 +0000 Received: by widem10 with SMTP id em10so8254418wid.1 for ; Fri, 06 Mar 2015 22:55:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/+UbsUXLEnVuEyaLvtO9IyINOdtWjjBKhb8oKFPIlS4=; b=UbzVrqWyTUGcRiOXsTUZ9UGPWBW/1Lc5kUzAUucvXPclfMzAbfKqGm7JHr3vf1/ohy NQDBgH78HXg47EjVaphk6xOlBtDHqEtN2mIcXjToMreKrKxmvgLv2Dww8oeXECPjC0by fXbnzaQZjTiWhDFwu3+fCrFFKbEblcuDOdrpUn60boWkr759k/yucSZ9+OcagqVjXwIh whNKedd1sd+Q5SHoesq4E8CdNQ544iaKZpaT7MDFBmNyVhqleUtAmllxbUYCYA0objem 5NmoSaiy4H+MYz+6Oa22srnR/vYHgQp4e8VZMJ/O4WXvsvjbqWZUcExABLs5R0aSNkh1 0ZeA== MIME-Version: 1.0 X-Received: by 10.180.79.65 with SMTP id h1mr40073862wix.59.1425711300691; Fri, 06 Mar 2015 22:55:00 -0800 (PST) Received: by 10.28.186.135 with HTTP; Fri, 6 Mar 2015 22:55:00 -0800 (PST) In-Reply-To: References: Date: Fri, 6 Mar 2015 22:55:00 -0800 Message-ID: Subject: Re: Problem with UNSIGNED_LONG ARRAY[] datatype. From: Nick Dimiduk To: "dev@phoenix.apache.org" Content-Type: multipart/alternative; boundary=14dae9cc9534a14c8c0510ad474e X-Virus-Checked: Checked by ClamAV on apache.org --14dae9cc9534a14c8c0510ad474e Content-Type: text/plain; charset=UTF-8 It seems ARRAY[1,2] is not being implicitly cast to a unsigned long array. Can you try an explicit cast? What if you declare f_array as (signed) long array? Will have a look at code and get back to you. On Thursday, March 5, 2015, Sergey Belousov wrote: > Hi all > > I keep banging my head against the wall and kind of out of ideas at this > point so I hope someone can give me little helping hand. > It safe to say that I am using almost 4.3 (build just before it released) > > Here is what I having problem with > > CREATE TABLE IF NOT EXISTS dev.t1 > ( > f_int UNSIGNED_INT NOT NULL, > f_long UNSIGNED_LONG NOT NULL, > f_array UNSIGNED_LONG ARRAY[] NOT NULL, > > CONSTRAINT pk PRIMARY KEY (f_int, f_long, f_array) > ); > > upsert into dev.t1 (f_int,f_long,f_array) values(1,1,ARRAY[1,2]); > > and getting > > Error: ERROR 203 (22005): Type mismatch. INTEGER ARRAY and UNSIGNED_LONG > ARRAY for expression: > org.apache.phoenix.schema.types.PhoenixArray$PrimitiveIntPhoenixArray@d32d5 > in column F_ARRAY (state=22005,code=203) > > I tried ARRAY[2] and having same problem > > !describe dev.t1; > > +-------------------+--------------------+--------------------+---------------------+---------+ > | TABLE_CAT | TABLE_SCHEM | TABLE_NAME | > COLUMN_NAME | | > > +-------------------+--------------------+--------------------+---------------------+---------+ > | null | DEV | T1 | F_INT > | 4 | > | null | DEV | T1 | F_LONG > | -5 | > | null | DEV | T1 | F_ARRAY > | 2003 | > > +-------------------+--------------------+--------------------+---------------------+---------+ > > Any idea what I am doing wrong ? > > Thank you > S > --14dae9cc9534a14c8c0510ad474e--