Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9359B200498 for ; Tue, 29 Aug 2017 18:19:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 914731630C6; Tue, 29 Aug 2017 16:19:10 +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 D722416307B for ; Tue, 29 Aug 2017 18:19:09 +0200 (CEST) Received: (qmail 71242 invoked by uid 500); 29 Aug 2017 16:19: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 71225 invoked by uid 99); 29 Aug 2017 16:19: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; Tue, 29 Aug 2017 16:19: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 1F42DC2C7F for ; Tue, 29 Aug 2017 16:19:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, 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 h_ox2qrT6acX for ; Tue, 29 Aug 2017 16:19: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 723C76125E for ; Tue, 29 Aug 2017 16:19: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 B6423E0986 for ; Tue, 29 Aug 2017 16:19: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 40C2323F15 for ; Tue, 29 Aug 2017 16:19:00 +0000 (UTC) Date: Tue, 29 Aug 2017 16:19:00 +0000 (UTC) From: "Csaba Skrabak (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (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 archived-at: Tue, 29 Aug 2017 16:19:10 -0000 Csaba Skrabak created PHOENIX-4139: -------------------------------------- Summary: select distinct with identical aggregations return we= ird 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 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 VARCHAR= (20), id BIGINT . . . . . . . . > constraint my_pk primary key (id)); 0: jdbc:phoenix:> upsert into test_select (nam, address,id) values('pulkit'= ,'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 test= _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), tr= im(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| pulkitpulk= it=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 output= has the cell data duplicated! {noformat} 0: jdbc:phoenix:> select distinct 'harshit' as "test_column", trim(nam), tr= im(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| pulkitpulk= itpulkit=E2=80=82=E2=80=82| pulkitpulkitpulkit=E2=80=82=E2=80=82| pulkitpul= kitpulkit=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 'harshit'= as "test_column" =E2=80=94=E2=80=94=E2=80=82=E2=80=82The issue is not seen {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 (v6.4.14#64029)