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 64BFA200BA8 for ; Mon, 24 Oct 2016 12:21:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6376C160B00; Mon, 24 Oct 2016 10:21:00 +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 9FBB7160AEB for ; Mon, 24 Oct 2016 12:20:59 +0200 (CEST) Received: (qmail 54257 invoked by uid 500); 24 Oct 2016 10:20:58 -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 54222 invoked by uid 99); 24 Oct 2016 10:20:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Oct 2016 10:20:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 58B552C0087 for ; Mon, 24 Oct 2016 10:20:58 +0000 (UTC) Date: Mon, 24 Oct 2016 10:20:58 +0000 (UTC) From: "Furcy Pin (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-15040) LATERAL VIEW + WHERE IN ...= WRONG RESULT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 24 Oct 2016 10:21:00 -0000 Furcy Pin created HIVE-15040: -------------------------------- Summary: LATERAL VIEW + WHERE IN ...= WRONG RESULT Key: HIVE-15040 URL: https://issues.apache.org/jira/browse/HIVE-15040 Project: Hive Issue Type: Bug Affects Versions: 2.0.0 Reporter: Furcy Pin Priority: Critical This query: {code} SELECT COUNT(1) FROM ( SELECT 1 as c1 , Array(1, 2, 3) as c2 UNION ALL SELECT 2 as c1 , Array(2, 3, 4) as c2 ) T LATERAL VIEW explode(c2) LV AS c WHERE c = 42 AND T.c1 NOT IN (SELECT 1 UNION ALL SELECT 3) ; {code} returns {{3}} in Hive 1.1.0 and 2.0.0 But obviously it should return 0, since {{c = 42}} is false. It seems that the clause is ignored. Spark-SQL does return {{0}}. P.S. The UNION ALL is not causing the bug, I just wanted to demonstrate is with a standalone query. Using regular tables instead still causes the same bug. -- This message was sent by Atlassian JIRA (v6.3.4#6332)