From dev-return-48982-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Tue Jan 30 17:39:07 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 5484E18061A for ; Tue, 30 Jan 2018 17:39:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4499C160C53; Tue, 30 Jan 2018 16:39:07 +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 90AA6160C42 for ; Tue, 30 Jan 2018 17:39:06 +0100 (CET) Received: (qmail 9048 invoked by uid 500); 30 Jan 2018 16:39:05 -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 9037 invoked by uid 99); 30 Jan 2018 16:39:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2018 16:39:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3D53BD4583 for ; Tue, 30 Jan 2018 16:39:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Xtkn3BLMYKKs for ; Tue, 30 Jan 2018 16:39:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id D21955FBD7 for ; Tue, 30 Jan 2018 16:39:03 +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 0AEA3E00FC for ; Tue, 30 Jan 2018 16:39:03 +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 D20E32410C for ; Tue, 30 Jan 2018 16:39:00 +0000 (UTC) Date: Tue, 30 Jan 2018 16:39:00 +0000 (UTC) From: "Csaba Skrabak (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 345338#comment-16345338 ]=20 Csaba Skrabak commented on PHOENIX-4139: ---------------------------------------- Oh. I have to revert a change to the test case. Uploading v3 that contains = the old test with the one-line fix. > 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 > > > 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)