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 D9857200CB4 for ; Tue, 27 Jun 2017 15:24:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D828D160BE9; Tue, 27 Jun 2017 13:24:03 +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 27EC0160BDC for ; Tue, 27 Jun 2017 15:24:03 +0200 (CEST) Received: (qmail 97047 invoked by uid 500); 27 Jun 2017 13:24:02 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 97038 invoked by uid 99); 27 Jun 2017 13:24:02 -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, 27 Jun 2017 13:24:02 +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 DC84A1A02ED for ; Tue, 27 Jun 2017 13:24:01 +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-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id U9SCbBq2EzqW for ; Tue, 27 Jun 2017 13:24:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C73745F30B for ; Tue, 27 Jun 2017 13:24:00 +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 52163E00A0 for ; Tue, 27 Jun 2017 13:24:00 +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 0AAF12410F for ; Tue, 27 Jun 2017 13:24:00 +0000 (UTC) Date: Tue, 27 Jun 2017 13:24:00 +0000 (UTC) From: "Yongzhi Chen (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-16869) Hive returns wrong result when predicates on non-existing columns are pushed down to Parquet reader MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 27 Jun 2017 13:24:04 -0000 [ https://issues.apache.org/jira/browse/HIVE-16869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yongzhi Chen updated HIVE-16869: -------------------------------- Resolution: Fixed Fix Version/s: 3.0.0 Status: Resolved (was: Patch Available) Committed the fix to master. Thanks [~Yibing] for your contribution. > Hive returns wrong result when predicates on non-existing columns are pushed down to Parquet reader > --------------------------------------------------------------------------------------------------- > > Key: HIVE-16869 > URL: https://issues.apache.org/jira/browse/HIVE-16869 > Project: Hive > Issue Type: Bug > Reporter: Yibing Shi > Assignee: Yibing Shi > Priority: Critical > Fix For: 3.0.0 > > Attachments: HIVE-16869.1.patch, HIVE-16869.2.patch > > > When {{hive.optimize.ppd}} and {{hive.optimize.index.filter}} are turned, and a select query has a condition on a column that doesn't exist in Parquet file (such as a partition column), Hive often returns wrong result. > Please see below example for details: > {noformat} > hive> create table test_parq (a int, b int) partitioned by (p int) stored as parquet; > OK > Time taken: 0.292 seconds > hive> insert overwrite table test_parq partition (p=1) values (1, 2); > OK > Time taken: 5.08 seconds > hive> select * from test_parq where a=1 and p=1; > OK > 1 2 1 > Time taken: 0.441 seconds, Fetched: 1 row(s) > hive> select * from test_parq where (a=1 and p=1) or (a=999 and p=999); > OK > 1 2 1 > Time taken: 0.197 seconds, Fetched: 1 row(s) > hive> set hive.optimize.index.filter=true; > hive> select * from test_parq where (a=1 and p=1) or (a=999 and p=999); > OK > Time taken: 0.167 seconds > hive> select * from test_parq where (a=1 or a=999) and (a=999 or p=1); > OK > Time taken: 0.563 seconds > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)