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 0E63D18544 for ; Mon, 14 Dec 2015 16:00:49 +0000 (UTC) Received: (qmail 12179 invoked by uid 500); 14 Dec 2015 16:00:48 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 11798 invoked by uid 500); 14 Dec 2015 16:00:48 -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 11733 invoked by uid 99); 14 Dec 2015 16:00:48 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2015 16:00:48 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2043F2C1F6E for ; Mon, 14 Dec 2015 16:00:48 +0000 (UTC) Date: Mon, 14 Dec 2015 16:00:48 +0000 (UTC) From: "Venki Korukanti (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-4194) Improve the performance of metadata fetch operation in HiveScan MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Venki Korukanti created DRILL-4194: -------------------------------------- Summary: Improve the performance of metadata fetch operation in HiveScan Key: DRILL-4194 URL: https://issues.apache.org/jira/browse/DRILL-4194 Project: Apache Drill Issue Type: Bug Components: Storage - Hive Affects Versions: 1.4.0 Reporter: Venki Korukanti Assignee: Venki Korukanti Fix For: 1.5.0 Current HiveScan fetches the InputSplits for all partitions when {{HiveScan}} is created. This causes long delays when the table contains large number of partitions. If we end up pruning majority of partitions, this delay is unnecessary. We need this InputSplits info from the beginning of planning because * it is used in calculating the cost of the {{HiveScan}}. Currently when calculating the cost first we look at the rowCount (from Hive MetaStore), if it is available we use it in cost calculation. Otherwise we estimate the rowCount from InputSplits. * We also need the InputSplits for determining whether {{HiveScan}} is a singleton or distributed for adding appropriate traits in {{ScanPrule}} Fix is to delay the loading of the InputSplits until we need. There are two cases where we need it. If we end up fetching the InputSplits, store them until the query completes. * If the stats are not available, then we need InputSplits * If the partition is not pruned we need it for parallelization purposes. Regarding getting the parallelization info in {{ScanPrule}}: Had a discussion with [~amansinha100]. All we need at this point is whether the data is distributed or singleton at this point. Added a method {{isSingleton()}} to GroupScan. Returning {{false}} seems to work fine for HiveScan, but I am not sure of the implications here. We also have {{ExcessiveExchangeIdentifier}} which removes unnecessary exchanges by looking at the parallelization info. I think it is ok to return the parallelization info here as the pruning must have already completed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)