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 1EBF0175B7 for ; Fri, 19 Jun 2015 08:35:03 +0000 (UTC) Received: (qmail 90131 invoked by uid 500); 19 Jun 2015 08:35:03 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 90092 invoked by uid 500); 19 Jun 2015 08:35: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 90081 invoked by uid 99); 19 Jun 2015 08:35:02 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 08:35:02 +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 8260D1A5CF7 for ; Fri, 19 Jun 2015 08:35:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.77 X-Spam-Level: * X-Spam-Status: No, score=1.77 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 0mUzMD7w-MKr for ; Fri, 19 Jun 2015 08:35:01 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 1218242B0E for ; Fri, 19 Jun 2015 08:35:00 +0000 (UTC) Received: (qmail 90051 invoked by uid 99); 19 Jun 2015 08:35:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2015 08:35:00 +0000 Date: Fri, 19 Jun 2015 08:35:00 +0000 (UTC) From: "PeiLiping (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-2053) The Expression IN has Bug when the params are less than zero MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-2053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] PeiLiping updated PHOENIX-2053: ------------------------------- Description: drop table test; create table test(a integer not null,b integer not null, c integer not null , d integer constraint pk primary key (a,b,c) ) compression='SNAPPY' , TTL=86400 split on (2,3,4,5,6,7,8,9,10); upsert into test values (1,-1,1,1) ; upsert into test values (2,-2,2,1) ; upsert into test values (3,-3,3,1) ; upsert into test values (4,-4,4,1) ; upsert into test values (5,-5,5,1) ; upsert into test values (6,-6,6,1) ; select c,sum(d) from test where a between 0 and 10 and b in (-2,-4,-5,-1) group by c ; +------------------------------------------+------------------------------------------+ | C | SUM(D) | +------------------------------------------+------------------------------------------+ | 5 | 1 | +------------------------------------------+------------------------------------------+ select c,sum(d) from test where a between 0 and 10 and (0-b) in (2,4,5,1) group by c ; +------------------------------------------+------------------------------------------+ | C | SUM(D) | +------------------------------------------+------------------------------------------+ | 1 | 1 | | 2 | 1 | | 4 | 1 | | 5 | 1 | +------------------------------------------+------------------------------------------+ was: select * from test where a in (1,2,3 ) is right select * from test where a in (-1 ) is right but select * from test where a in (-1,-2,-3) is wrong I think when params are less then zero the scan range is wrong > The Expression IN has Bug when the params are less than zero > -------------------------------------------------------------- > > Key: PHOENIX-2053 > URL: https://issues.apache.org/jira/browse/PHOENIX-2053 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.3.0 > Reporter: PeiLiping > > drop table test; > create table test(a integer not null,b integer not null, c integer not null , d integer constraint pk primary key (a,b,c) ) compression='SNAPPY' , TTL=86400 split on (2,3,4,5,6,7,8,9,10); > upsert into test values (1,-1,1,1) ; > upsert into test values (2,-2,2,1) ; > upsert into test values (3,-3,3,1) ; > upsert into test values (4,-4,4,1) ; > upsert into test values (5,-5,5,1) ; > upsert into test values (6,-6,6,1) ; > select c,sum(d) from test where a between 0 and 10 and b in (-2,-4,-5,-1) group by c ; > +------------------------------------------+------------------------------------------+ > | C | SUM(D) | > +------------------------------------------+------------------------------------------+ > | 5 | 1 | > +------------------------------------------+------------------------------------------+ > select c,sum(d) from test where a between 0 and 10 and (0-b) in (2,4,5,1) group by c ; > +------------------------------------------+------------------------------------------+ > | C | SUM(D) | > +------------------------------------------+------------------------------------------+ > | 1 | 1 | > | 2 | 1 | > | 4 | 1 | > | 5 | 1 | > +------------------------------------------+------------------------------------------+ -- This message was sent by Atlassian JIRA (v6.3.4#6332)