From dev-return-48983-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Tue Jan 30 17:40:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 7845618061A for ; Tue, 30 Jan 2018 17:40:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 65F14160C54; Tue, 30 Jan 2018 16:40:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AE914160C53 for ; Tue, 30 Jan 2018 17:40:04 +0100 (CET) Received: (qmail 11134 invoked by uid 500); 30 Jan 2018 16:40:03 -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 11123 invoked by uid 99); 30 Jan 2018 16:40:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2018 16:40:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5B8331A438F for ; Tue, 30 Jan 2018 16:40:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 5pASDwYNe3oX for ; Tue, 30 Jan 2018 16:40:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 12C075F2F0 for ; Tue, 30 Jan 2018 16:40:02 +0000 (UTC) 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 58ABBE0226 for ; Tue, 30 Jan 2018 16:40:01 +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 787F924126 for ; Tue, 30 Jan 2018 16:40:00 +0000 (UTC) Date: Tue, 30 Jan 2018 16:40:00 +0000 (UTC) From: "Csaba Skrabak (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-4139) select distinct with identical aggregations return weird values 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-4139?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Csaba Skrabak updated PHOENIX-4139: ----------------------------------- Attachment: PHOENIX-4139_v3.patch > select distinct with identical aggregations return weird values=20 > ---------------------------------------------------------------- > > Key: PHOENIX-4139 > URL: https://issues.apache.org/jira/browse/PHOENIX-4139 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.12.0 > Environment: minicluster > Reporter: Csaba Skrabak > Assignee: Csaba Skrabak > Priority: Minor > Fix For: 4.14.0 > > Attachments: PHOENIX-4139.patch, PHOENIX-4139_v2.patch, PHOENIX-4= 139_v3.patch > > > From sme-hbase hipchat room: > Pulkit Bhardwaj=C2=B710:31 > i'm seeing a weird issue with phoenix, appreciate some thoughts > Created a simple table in phoenix > {noformat} > 0: jdbc:phoenix:> create table test_select(nam VARCHAR(20), address VARCH= AR(20), id BIGINT > . . . . . . . . > constraint my_pk primary key (id)); > 0: jdbc:phoenix:> upsert into test_select (nam, address,id) values('pulki= t','badaun',1); > 0: jdbc:phoenix:> select * from test_select; > +---------+----------+-----+ > |=E2=80=82=E2=80=82 NAM=E2=80=82=E2=80=82 | ADDRESS=E2=80=82=E2=80=82| ID= =E2=80=82=E2=80=82| > +---------+----------+-----+ > | pulkit=E2=80=82=E2=80=82| badaun=E2=80=82=E2=80=82 | 1=E2=80=82=E2=80= =82 | > +---------+----------+-----+ > 0: jdbc:phoenix:> select distinct 'harshit' as "test_column", nam from te= st_select; > +--------------+---------+ > | test_column=E2=80=82=E2=80=82|=E2=80=82=E2=80=82 NAM=E2=80=82=E2=80=82 = | > +--------------+---------+ > | harshit=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82| pulkit= =E2=80=82=E2=80=82| > +--------------+---------+ > 0: jdbc:phoenix:> select distinct 'harshit' as "test_column", trim(nam), = trim(nam) from test_select; > +--------------+----------------+----------------+ > | test_column=E2=80=82=E2=80=82|=E2=80=82=E2=80=82 TRIM(NAM)=E2=80=82=E2= =80=82=E2=80=82=E2=80=82|=E2=80=82=E2=80=82 TRIM(NAM)=E2=80=82=E2=80=82=E2= =80=82=E2=80=82| > +--------------+----------------+----------------+ > | harshit=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82| pulkitpu= lkit=E2=80=82=E2=80=82| pulkitpulkit=E2=80=82=E2=80=82| > +--------------+----------------+----------------+ > {noformat} > When I apply a trim on the nam column and use it multiple times, the outp= ut has the cell data duplicated! > {noformat} > 0: jdbc:phoenix:> select distinct 'harshit' as "test_column", trim(nam), = trim(nam), trim(nam) from test_select; > +--------------+-----------------------+-----------------------+---------= --------------+ > | test_column=E2=80=82=E2=80=82|=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2= =80=82=E2=80=82 TRIM(NAM)=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2= =80=82 |=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 TRIM(NAM)=E2= =80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 |=E2=80=82=E2=80=82=E2= =80=82=E2=80=82=E2=80=82=E2=80=82 TRIM(NAM)=E2=80=82=E2=80=82=E2=80=82=E2= =80=82=E2=80=82=E2=80=82 | > +--------------+-----------------------+-----------------------+---------= --------------+ > | harshit=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82| pulkitpu= lkitpulkit=E2=80=82=E2=80=82| pulkitpulkitpulkit=E2=80=82=E2=80=82| pulkitp= ulkitpulkit=E2=80=82=E2=80=82| > +--------------+-----------------------+-----------------------+---------= --------------+ > {noformat} > Wondering if someone has seen this before?? > One thing to note is, if I remove the =E2=80=94=E2=80=94 distinct 'harshi= t' as "test_column" =E2=80=94=E2=80=94=E2=80=82=E2=80=82The issue is not se= en > {noformat} > 0: jdbc:phoenix:> select trim(nam), trim(nam), trim(nam) from test_select= ; > +------------+------------+------------+ > | TRIM(NAM)=E2=80=82=E2=80=82| TRIM(NAM)=E2=80=82=E2=80=82| TRIM(NAM)=E2= =80=82=E2=80=82| > +------------+------------+------------+ > | pulkit=E2=80=82=E2=80=82=E2=80=82=E2=80=82 | pulkit=E2=80=82=E2=80=82= =E2=80=82=E2=80=82 | pulkit=E2=80=82=E2=80=82=E2=80=82=E2=80=82 | > +------------+------------+------------+ > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)