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 8A58B200B7C for ; Thu, 4 Aug 2016 02:42:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 892FF160A8C; Thu, 4 Aug 2016 00:42:22 +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 CE6E1160AB0 for ; Thu, 4 Aug 2016 02:42:21 +0200 (CEST) Received: (qmail 81048 invoked by uid 500); 4 Aug 2016 00:42:20 -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 80927 invoked by uid 99); 4 Aug 2016 00:42:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2016 00:42:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B688C2C0059 for ; Thu, 4 Aug 2016 00:42:20 +0000 (UTC) Date: Thu, 4 Aug 2016 00:42:20 +0000 (UTC) From: "Aman Sinha (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DRILL-4825) Wrong data with UNION ALL when querying different sub-directories under the same table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 04 Aug 2016 00:42:22 -0000 [ https://issues.apache.org/jira/browse/DRILL-4825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15406902#comment-15406902 ] Aman Sinha edited comment on DRILL-4825 at 8/4/16 12:42 AM: ------------------------------------------------------------ I found that the incorrect results is caused by the fix for DRILL-2517. The commit # 03197d0 before this patch produces correct results: {noformat} // correct result 0: jdbc:drill:zk=local> select * from (select min(o_custkey) as x from dfs.`multilevel/parquet` where dir0 = 1994) inner join (select min(o_custkey) as y from dfs.`multilevel/parquet` where dir0 = 1996) on x = y; +----+----+ | x | y | +----+----+ +----+----+ No rows selected (0.726 seconds) {noformat} was (Author: amansinha100): I found that the incorrect results is caused by the fix for DRILL-2517. The commit # 03197d0 before this patch produces correct results: {noformat} // correct result 0: jdbc:drill:zk=local> select * from (select min(o_custkey) as x from dfs.`multilevel/parquet` where dir0 = 1994) inner join (select min(o_custkey) as y from dfs.`multilevel/parquet` where dir0 = 1996) on x = y; +----+----+ | x | y | +----+----+ +----+----+ No rows selected (0.726 seconds) > Wrong data with UNION ALL when querying different sub-directories under the same table > -------------------------------------------------------------------------------------- > > Key: DRILL-4825 > URL: https://issues.apache.org/jira/browse/DRILL-4825 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.8.0 > Reporter: Rahul Challapalli > Priority: Critical > Attachments: l_3level.tgz > > > git.commit.id.abbrev=0700c6b > The below query returns wrongs results > {code} > select count (*) from ( > select l_orderkey, dir0 from l_3level t1 where t1.dir0 = 1 and t1.dir1='one' and t1.dir2 = '2015-7-12' > union all > select l_orderkey, dir0 from l_3level t2 where t2.dir0 = 1 and t2.dir1='two' and t2.dir2 = '2015-8-12') data; > +---------+ > | EXPR$0 | > +---------+ > | 20 | > +---------+ > {code} > The wrong result is evident from the output of the below queries > {code} > 0: jdbc:drill:zk=10.10.100.190:5181> select count (*) from (select l_orderkey, dir0 from l_3level t2 where t2.dir0 = 1 and t2.dir1='two' and t2.dir2 = '2015-8-12'); > +---------+ > | EXPR$0 | > +---------+ > | 30 | > +---------+ > 1 row selected (0.258 seconds) > 0: jdbc:drill:zk=10.10.100.190:5181> select count (*) from (select l_orderkey, dir0 from l_3level t2 where t2.dir0 = 1 and t2.dir1='one' and t2.dir2 = '2015-7-12'); > +---------+ > | EXPR$0 | > +---------+ > | 10 | > +---------+ > {code} > I attached the data set. Let me know if you need anything more -- This message was sent by Atlassian JIRA (v6.3.4#6332)