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 85EC2200D3C for ; Tue, 31 Oct 2017 03:34:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 848A3160BF8; Tue, 31 Oct 2017 02:34:12 +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 A478F160BE4 for ; Tue, 31 Oct 2017 03:34:11 +0100 (CET) Received: (qmail 25023 invoked by uid 500); 31 Oct 2017 02:34:10 -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 25012 invoked by uid 99); 31 Oct 2017 02:34:10 -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, 31 Oct 2017 02:34:10 +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 CE7F11A2FB1 for ; Tue, 31 Oct 2017 02:34:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ra5e13D6Avol for ; Tue, 31 Oct 2017 02:34:07 +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 7530961105 for ; Tue, 31 Oct 2017 02:34:07 +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 BA03CE264D for ; Tue, 31 Oct 2017 02:34:05 +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 81EAB21311 for ; Tue, 31 Oct 2017 02:34:02 +0000 (UTC) Date: Tue, 31 Oct 2017 02:34:02 +0000 (UTC) From: "Samarth Jain (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-4287) Incorrect aggregate query results when stats are disable for parallelization MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 31 Oct 2017 02:34:12 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-4287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Samarth Jain updated PHOENIX-4287: ---------------------------------- Attachment: PHOENIX-4287_v3_wip.patch wip patch for an attempt to use the existing code. Doesn't work, yet. > Incorrect aggregate query results when stats are disable for parallelization > ---------------------------------------------------------------------------- > > Key: PHOENIX-4287 > URL: https://issues.apache.org/jira/browse/PHOENIX-4287 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.12.0 > Environment: HBase 1.3.1 > Reporter: Mujtaba Chohan > Assignee: Samarth Jain > Labels: localIndex > Fix For: 4.12.1 > > Attachments: PHOENIX-4287.patch, PHOENIX-4287_v2.patch, PHOENIX-4287_v3_wip.patch > > > With {{phoenix.use.stats.parallelization}} set to {{false}}, aggregate query returns incorrect results when stats are available. > With local index and stats disabled for parallelization: > {noformat} > explain select count(*) from TABLE_T; > +-------------------------------------------------------------------------------------------------------+-----------------+----------------+-----------+ > | PLAN | EST_BYTES_READ | EST_ROWS_READ | EST_INFO | > +-------------------------------------------------------------------------------------------------------+-----------------+----------------+-----------+ > | CLIENT 0-CHUNK 332170 ROWS 625043899 BYTES PARALLEL 0-WAY RANGE SCAN OVER TABLE_T [1] | 625043899 | 332170 | 150792825 | > | SERVER FILTER BY FIRST KEY ONLY | 625043899 | 332170 | 150792825 | > | SERVER AGGREGATE INTO SINGLE ROW | 625043899 | 332170 | 150792825 | > +-------------------------------------------------------------------------------------------------------+-----------------+----------------+-----------+ > select count(*) from TABLE_T; > +-----------+ > | COUNT(1) | > +-----------+ > | 0 | > +-----------+ > {noformat} > Using data table > {noformat} > explain select /*+NO_INDEX*/ count(*) from TABLE_T; > +--------------------------------------------------------------------------------------------------+-----------------+----------------+----------------+ > | PLAN | EST_BYTES_READ | EST_ROWS_READ | EST_INFO_TS | > +--------------------------------------------------------------------------------------------------+-----------------+----------------+----------------+ > | CLIENT 2-CHUNK 332151 ROWS 438492470 BYTES PARALLEL 1-WAY FULL SCAN OVER TABLE_T | 438492470 | 332151 | 1507928257617 | > | SERVER FILTER BY FIRST KEY ONLY | 438492470 | 332151 | 1507928257617 | > | SERVER AGGREGATE INTO SINGLE ROW | 438492470 | 332151 | 1507928257617 | > +--------------------------------------------------------------------------------------------------+-----------------+----------------+----------------+ > select /*+NO_INDEX*/ count(*) from TABLE_T; > +-----------+ > | COUNT(1) | > +-----------+ > | 14 | > +-----------+ > {noformat} > Without stats available, results are correct: > {noformat} > explain select /*+NO_INDEX*/ count(*) from TABLE_T; > +----------------------------------------------------------------------+-----------------+----------------+--------------+ > | PLAN | EST_BYTES_READ | EST_ROWS_READ | EST_INFO_TS | > +----------------------------------------------------------------------+-----------------+----------------+--------------+ > | CLIENT 2-CHUNK PARALLEL 1-WAY FULL SCAN OVER TABLE_T | null | null | null | > | SERVER FILTER BY FIRST KEY ONLY | null | null | null | > | SERVER AGGREGATE INTO SINGLE ROW | null | null | null | > +----------------------------------------------------------------------+-----------------+----------------+--------------+ > select /*+NO_INDEX*/ count(*) from TABLE_T; > +-----------+ > | COUNT(1) | > +-----------+ > | 333327 | > +-----------+ > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)