Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-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 C89F91809F for ; Fri, 25 Sep 2015 06:21:04 +0000 (UTC) Received: (qmail 96023 invoked by uid 500); 25 Sep 2015 06:21:04 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 95881 invoked by uid 500); 25 Sep 2015 06:21:04 -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 95869 invoked by uid 99); 25 Sep 2015 06:21:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2015 06:21:04 +0000 Date: Fri, 25 Sep 2015 06:21:04 +0000 (UTC) From: "WangMeng (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-11880) filter bug of UNION ALL when hive.ppd.remove.duplicatefilters=true and filter condition is type incompatible column 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-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14907667#comment-14907667 ] WangMeng commented on HIVE-11880: --------------------------------- [~xuefuz] I have rebased it and uploaded a new patch. [~ashutoshc] I tried the patch of HIVE-11919 again after I rebased, it can not fix this bug also. Please check it again . Thanks. > filter bug of UNION ALL when hive.ppd.remove.duplicatefilters=true and filter condition is type incompatible column > --------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-11880 > URL: https://issues.apache.org/jira/browse/HIVE-11880 > Project: Hive > Issue Type: Bug > Components: Logical Optimizer > Affects Versions: 1.2.1 > Reporter: WangMeng > Assignee: WangMeng > Attachments: HIVE-11880.01.patch, HIVE-11880.02.patch, HIVE-11880.03.patch > > > For UNION ALL , when an union operator is constant column (such as '0L', BIGINT Type) and its corresponding column has incompatible type (such as INT type). > Query with filter condition on type incompatible column on this UNION ALL will cause IndexOutOfBoundsException. > Such as TPC-H table "orders",in the following query: > Type of 'orders'.'o_custkey' is INT normally, while the type of corresponding constant column "0" is BIGINT( `0L AS `o_custkey` ). > This query (with filter "type incompatible column 'o_custkey' ") will fail with java.lang.IndexOutOfBoundsException : > {code} > SELECT Count(1) > FROM ( > SELECT `o_orderkey` , > `o_custkey` > FROM `orders` > UNION ALL > SELECT `o_orderkey`, > 0L AS `o_custkey` > FROM `orders`) `oo` > WHERE o_custkey<100000 limit 4 ; > {code} > When > {code} > set hive.ppd.remove.duplicatefilters=true > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)