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 7379B2004F3 for ; Tue, 15 Aug 2017 17:10:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 71DDD166C85; Tue, 15 Aug 2017 15:10: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 90420166C80 for ; Tue, 15 Aug 2017 17:10:09 +0200 (CEST) Received: (qmail 24375 invoked by uid 500); 15 Aug 2017 15:10:06 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 24362 invoked by uid 99); 15 Aug 2017 15:10:06 -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, 15 Aug 2017 15:10:06 +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 29DBC1A0051 for ; Tue, 15 Aug 2017 15:10:06 +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-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id TDdEp_KNte8H for ; Tue, 15 Aug 2017 15:10:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 086075FCE2 for ; Tue, 15 Aug 2017 15:10:04 +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 E3489E0D92 for ; Tue, 15 Aug 2017 15:10:02 +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 2F580218F6 for ; Tue, 15 Aug 2017 15:10:02 +0000 (UTC) Date: Tue, 15 Aug 2017 15:10:02 +0000 (UTC) From: "Arina Ielchiieva (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (DRILL-5357) Partition pruning information not available in query plan for COUNT aggregate query MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 15 Aug 2017 15:10:10 -0000 [ https://issues.apache.org/jira/browse/DRILL-5357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arina Ielchiieva resolved DRILL-5357. ------------------------------------- Resolution: Fixed Fix Version/s: 1.12.0 Fixed in the scope of DRILL-4735. > Partition pruning information not available in query plan for COUNT aggregate query > ----------------------------------------------------------------------------------- > > Key: DRILL-5357 > URL: https://issues.apache.org/jira/browse/DRILL-5357 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.10.0 > Environment: 3 node CentOS cluster > Reporter: Khurram Faraaz > Assignee: Arina Ielchiieva > Fix For: 1.12.0 > > > We are not seeing partition pruning information in the query plan for the below, COUNT(*) and COUNT() query > Drill 1.10.0-SNAPSHOT > git commit id: b657d44f > parquet table has 6 columns > total number of rows = 1638640 > {noformat} > 0: jdbc:drill:schema=dfs.tmp> CREATE TABLE tbl_prtn_prune_01 PARTITION BY (col_state) > AS > SELECT CAST(columns[0] AS DATE) col_date, > CAST(columns[1] AS CHAR(3)) col_state, > CAST(columns[2] AS INTEGER) col_prime, > CAST(columns[3] AS VARCHAR(256)) col_varstr, > CAST(columns[4] AS INTEGER) col_id, > CAST(columns[5] AS VARCHAR(50)) col_name > from `partition_prune_data.csv`; > +-----------+----------------------------+ > | Fragment | Number of records written | > +-----------+----------------------------+ > | 0_0 | 1638640 | > +-----------+----------------------------+ > 1 row selected (17.675 seconds) > 0: jdbc:drill:schema=dfs.tmp> select COUNT(*) from tbl_prtn_prune_01 where col_state = 'CA'; > +---------+ > | EXPR$0 | > +---------+ > | 35653 | > +---------+ > 1 row selected (0.471 seconds) > 0: jdbc:drill:schema=dfs.tmp> explain plan for select COUNT(*) from tbl_prtn_prune_01 where col_state = 'CA'; > +------+------+ > | text | json | > +------+------+ > | 00-00 Screen > 00-01 Project(EXPR$0=[$0]) > 00-02 Project(EXPR$0=[$0]) > 00-03 Scan(groupscan=[org.apache.drill.exec.store.pojo.PojoRecordReader@1d4bb67d[columns = null, isStarQuery = false, isSkipQuery = false]]) > {noformat} > And then I did a REFRESH TABLE METADATA on the parquet table > {noformat} > 0: jdbc:drill:schema=dfs.tmp> refresh table metadata tbl_prtn_prune_01; > +-------+-------------------------------------------------------------+ > | ok | summary | > +-------+-------------------------------------------------------------+ > | true | Successfully updated metadata for table tbl_prtn_prune_01. | > +-------+-------------------------------------------------------------+ > 1 row selected (0.321 seconds) > 0: jdbc:drill:schema=dfs.tmp> explain plan for select COUNT(col_state) from tbl_prtn_prune_01 where col_state = 'CA'; > +------+------+ > | text | json | > +------+------+ > | 00-00 Screen > 00-01 Project(EXPR$0=[$0]) > 00-02 Project(EXPR$0=[$0]) > 00-03 Scan(groupscan=[org.apache.drill.exec.store.pojo.PojoRecordReader@2e0f4be9[columns = null, isStarQuery = false, isSkipQuery = false]]) > 0: jdbc:drill:schema=dfs.tmp> explain plan for select COUNT(*) from tbl_prtn_prune_01 where col_state = 'CA'; > +------+------+ > | text | json | > +------+------+ > | 00-00 Screen > 00-01 Project(EXPR$0=[$0]) > 00-02 Project(EXPR$0=[$0]) > 00-03 Scan(groupscan=[org.apache.drill.exec.store.pojo.PojoRecordReader@3fc1f8e7[columns = null, isStarQuery = false, isSkipQuery = false]]) > 0: jdbc:drill:schema=dfs.tmp> explain plan for select COUNT(col_date) from tbl_prtn_prune_01 where col_state = 'CA'; > +------+------+ > | text | json | > +------+------+ > | 00-00 Screen > 00-01 Project(EXPR$0=[$0]) > 00-02 Project(EXPR$0=[$0]) > 00-03 Scan(groupscan=[org.apache.drill.exec.store.pojo.PojoRecordReader@7afc851e[columns = null, isStarQuery = false, isSkipQuery = false]]) > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)