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 5F650200B5B for ; Fri, 5 Aug 2016 22:27:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5E206160A8E; Fri, 5 Aug 2016 20:27:22 +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 AC391160AAC for ; Fri, 5 Aug 2016 22:27:21 +0200 (CEST) Received: (qmail 16196 invoked by uid 500); 5 Aug 2016 20:27:20 -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 16016 invoked by uid 99); 5 Aug 2016 20:27:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2016 20:27:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id AC4132C0D5F for ; Fri, 5 Aug 2016 20:27:20 +0000 (UTC) Date: Fri, 5 Aug 2016 20:27:20 +0000 (UTC) From: "Mohit Sabharwal (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-14251) Union All of different types resolves to incorrect data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 05 Aug 2016 20:27:22 -0000 [ https://issues.apache.org/jira/browse/HIVE-14251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15410019#comment-15410019 ] Mohit Sabharwal commented on HIVE-14251: ---------------------------------------- LGTM, +1 Should this behavior change be documented in https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Union ? > Union All of different types resolves to incorrect data > ------------------------------------------------------- > > Key: HIVE-14251 > URL: https://issues.apache.org/jira/browse/HIVE-14251 > Project: Hive > Issue Type: Bug > Components: Query Planning > Affects Versions: 2.0.0 > Reporter: Aihua Xu > Assignee: Aihua Xu > Attachments: HIVE-14251.1.patch, HIVE-14251.2.patch, HIVE-14251.3.patch, HIVE-14251.4.patch > > > create table src(c1 date, c2 int, c3 double); > insert into src values ('2016-01-01',5,1.25); > select * from > (select c1 from src union all > select c2 from src union all > select c3 from src) t; > It will return NULL for the c1 values. Seems the common data type is resolved to the last c3 which is double. -- This message was sent by Atlassian JIRA (v6.3.4#6332)