Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C88A010D2E for ; Fri, 15 Nov 2013 07:40:52 +0000 (UTC) Received: (qmail 89497 invoked by uid 500); 15 Nov 2013 07:39:29 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 89398 invoked by uid 500); 15 Nov 2013 07:39:26 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 89381 invoked by uid 500); 15 Nov 2013 07:39:24 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 89368 invoked by uid 99); 15 Nov 2013 07:39:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Nov 2013 07:39:21 +0000 Date: Fri, 15 Nov 2013 07:39:21 +0000 (UTC) From: "Rui Li (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-5831) filter input files for bucketed tables 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/HIVE-5831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rui Li updated HIVE-5831: ------------------------- Attachment: hive-5831.patch This implementation supports filtering bucketed table with single bucket key. The bucket key can be of type int or string. And it supports "=", "IN" and "BETWEEN AND" operators as the predicate. Set hive.optimize.bucket.filter to true to enable this feature. > filter input files for bucketed tables > -------------------------------------- > > Key: HIVE-5831 > URL: https://issues.apache.org/jira/browse/HIVE-5831 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Reporter: Rui Li > Attachments: hive-5831.patch > > > When the users query a bucketed table and use the bucketed column in the predicate, only the buckets that satisfy the predicate need to be scanned, thus improving the performance. > Given a table test: > CREATE TABLE test (x INT, y STRING) CLUSTERED BY ( x ) INTO 10 BUCKETS; > The following query only has to scan bucket 5: > SELECT * FROM test WHERE x=5; -- This message was sent by Atlassian JIRA (v6.1#6144)