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 669A1200B62 for ; Fri, 12 Aug 2016 10:17:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 65347160AB0; Fri, 12 Aug 2016 08:17:23 +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 B4F7F160AA6 for ; Fri, 12 Aug 2016 10:17:22 +0200 (CEST) Received: (qmail 82804 invoked by uid 500); 12 Aug 2016 08:17:21 -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 82481 invoked by uid 99); 12 Aug 2016 08:17:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2016 08:17:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C09532C02AD for ; Fri, 12 Aug 2016 08:17:20 +0000 (UTC) Date: Fri, 12 Aug 2016 08:17:20 +0000 (UTC) From: "wenhe li (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-14530) Union All query returns incorrect results. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 12 Aug 2016 08:17:23 -0000 wenhe li created HIVE-14530: ------------------------------- Summary: Union All query returns incorrect results. Key: HIVE-14530 URL: https://issues.apache.org/jira/browse/HIVE-14530 Project: Hive Issue Type: Bug Components: Query Planning Affects Versions: 2.1.0 Environment: Hadoop 2.6 Hive 2.1 Reporter: wenhe li create table dw_tmp.l_test1 (id bigint,val string,trans_date string) row format delimited fields terminated by ' ' ; create table dw_tmp.l_test2 (id bigint,val string,trans_date string) row format delimited fields terminated by ' ' ; select * from dw_tmp.l_test1; 1 table_1 2016-08-11 select * from dw_tmp.l_test2; 2 table_2 2016-08-11 -- right like this select id, 'table_1' , trans_date from dw_tmp.l_test1 union all select id, val, trans_date from dw_tmp.l_test2 ; 1 table_1 2016-08-11 2 table_2 2016-08-11 -- incorrect select id, 999, 'table_1' , trans_date from dw_tmp.l_test1 union all select id, 999, val, trans_date from dw_tmp.l_test2 ; 1 999 table_1 2016-08-11 2 999 table_1 2016-08-11 <-- here is wrong -- incorrect select id, 999, 666, 'table_1' , trans_date from dw_tmp.l_test1 union all select id, 999, 666, val, trans_date from dw_tmp.l_test2 ; 1 999 666 table_1 2016-08-11 2 999 666 table_1 2016-08-11 <-- here is wrong -- right select id, 999, 'table_1' , trans_date, '2016-11-11' from dw_tmp.l_test1 union all select id, 999, val, trans_date, trans_date from dw_tmp.l_test2 ; 1 999 table_1 2016-08-11 2016-11-11 2 999 table_2 2016-08-11 2016-08-11 -- This message was sent by Atlassian JIRA (v6.3.4#6332)