Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42001CD3E for ; Wed, 7 Jan 2015 21:31:35 +0000 (UTC) Received: (qmail 97642 invoked by uid 500); 7 Jan 2015 21:31:36 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 97618 invoked by uid 500); 7 Jan 2015 21:31:36 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 97528 invoked by uid 99); 7 Jan 2015 21:31:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 21:31:36 +0000 Date: Wed, 7 Jan 2015 21:31:36 +0000 (UTC) From: "Aman Sinha (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (DRILL-1946) Wrong result for aggregation query with lower slice_target 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/DRILL-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aman Sinha reassigned DRILL-1946: --------------------------------- Assignee: Aman Sinha (was: Chris Westin) > Wrong result for aggregation query with lower slice_target > ---------------------------------------------------------- > > Key: DRILL-1946 > URL: https://issues.apache.org/jira/browse/DRILL-1946 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Operators > Affects Versions: 0.7.0 > Reporter: Aman Sinha > Assignee: Aman Sinha > > Here's the result with the default value of slice_target for the following query: > {code} > select count(*) from ( > SELECT l_suppkey, sum(l_extendedprice)/sum(l_quantity) > FROM cp.`tpch/lineitem.parquet` > WHERE (l_orderkey in (SELECT o_orderkey FROM cp.`tpch/orders.parquet` > WHERE o_custkey < 2) ) > GROUP BY l_suppkey > ); > +------------+ > | EXPR$0 | > +------------+ > | 29 | > +------------+ > {code} > I lowered the slice_target in order to force exchanges in the following query. The result is wrong. > {code} > 0: jdbc:drill:zk=local> alter session set `planner.slice_target` = 1; > select count(*) from ( > SELECT l_suppkey, sum(l_extendedprice)/sum(l_quantity) > FROM cp.`tpch/lineitem.parquet` > WHERE (l_orderkey in (SELECT o_orderkey FROM cp.`tpch/orders.parquet` > WHERE o_custkey < 2) ) > GROUP BY l_suppkey > ); > +------------+ > | EXPR$0 | > +------------+ > | 14 | > +------------+ > {code} > The Explain plan for the second query has multiphase aggregates. When I set planner.enable_multiphase_agg = false, the result is correct, so it seems to be a multiphase aggregate issue based on a preliminary analysis (although there might be other things going on). -- This message was sent by Atlassian JIRA (v6.3.4#6332)