From dev-return-50098-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Mon Mar 12 23:22:05 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E5EC5180718 for ; Mon, 12 Mar 2018 23:22:04 +0100 (CET) Received: (qmail 51325 invoked by uid 500); 12 Mar 2018 22:22: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 51047 invoked by uid 99); 12 Mar 2018 22:22:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2018 22:22:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 55AD5C0475 for ; Mon, 12 Mar 2018 22:22:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id RGR9rEMCbupe for ; Mon, 12 Mar 2018 22:22: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 CBF155F5C6 for ; Mon, 12 Mar 2018 22:22:01 +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 D98C6E0226 for ; Mon, 12 Mar 2018 22:22: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 3D42821475 for ; Mon, 12 Mar 2018 22:22:00 +0000 (UTC) Date: Mon, 12 Mar 2018 22:22:00 +0000 (UTC) From: "Hudson (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4139) Incorrect query result for trailing duplicate GROUP BY expression 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= 396166#comment-16396166 ]=20 Hudson commented on PHOENIX-4139: --------------------------------- FAILURE: Integrated in Jenkins build PreCommit-PHOENIX-Build #1801 (See [ht= tps://builds.apache.org/job/PreCommit-PHOENIX-Build/1801/]) PHOENIX-4139 Incorrect query result for trailing duplicate GROUP BY (jtaylo= r: rev 35a90e4e6ea46105983d60d845324abaf5028d99) * (edit) phoenix-core/src/main/java/org/apache/phoenix/schema/RowKeyValueAc= cessor.java * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.ja= va > Incorrect query result for trailing duplicate GROUP BY expression=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, 5.0.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)