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 0B820188D5 for ; Fri, 11 Dec 2015 21:26:47 +0000 (UTC) Received: (qmail 80406 invoked by uid 500); 11 Dec 2015 21:26:47 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 80378 invoked by uid 500); 11 Dec 2015 21:26:47 -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 80321 invoked by uid 99); 11 Dec 2015 21:26:46 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Dec 2015 21:26:46 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C3ECE2C1F64 for ; Fri, 11 Dec 2015 21:26:46 +0000 (UTC) Date: Fri, 11 Dec 2015 21:26:46 +0000 (UTC) From: "Krystal (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-3921) Hive LIMIT 1 queries take too long 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-3921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15053590#comment-15053590 ] Krystal commented on DRILL-3921: -------------------------------- git.commit.id.abbrev=b906811 Verified that hive limit 1 queries completed much faster than before fix. > Hive LIMIT 1 queries take too long > ---------------------------------- > > Key: DRILL-3921 > URL: https://issues.apache.org/jira/browse/DRILL-3921 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Flow > Reporter: Sudheesh Katkam > Assignee: Sudheesh Katkam > Fix For: 1.3.0 > > > Fragment initialization on a Hive table (that is backed by a directory of many files) can take really long. This is evident through LIMIT 1 queries. The root cause is that the underlying reader in the HiveRecordReader is initialized when the ctor is called, rather than when setup is called. > Two changes need to be made: > 1) lazily initialize the underlying record reader in HiveRecordReader > 2) allow for running a callable as a proxy user within an operator (through OperatorContext). This is required as initialization of the underlying record reader needs to be done as a proxy user (proxy for owner of the file). Previously, this was handled while creating the record batch tree. -- This message was sent by Atlassian JIRA (v6.3.4#6332)