Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0FB617EEE for ; Tue, 30 Sep 2014 23:52:37 +0000 (UTC) Received: (qmail 35402 invoked by uid 500); 30 Sep 2014 23:52:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 35326 invoked by uid 500); 30 Sep 2014 23:52:34 -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 35245 invoked by uid 500); 30 Sep 2014 23:52:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 35227 invoked by uid 99); 30 Sep 2014 23:52:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Sep 2014 23:52:34 +0000 Date: Tue, 30 Sep 2014 23:52:34 +0000 (UTC) From: "Pengcheng Xiong (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-8225) CBO trunk merge: union11 test fails due to incorrect plan 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-8225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154042#comment-14154042 ] Pengcheng Xiong commented on HIVE-8225: --------------------------------------- review link: https://reviews.apache.org/r/26209/ > CBO trunk merge: union11 test fails due to incorrect plan > --------------------------------------------------------- > > Key: HIVE-8225 > URL: https://issues.apache.org/jira/browse/HIVE-8225 > Project: Hive > Issue Type: Bug > Reporter: Sergey Shelukhin > Assignee: Sergey Shelukhin > Attachments: HIVE-8225.1.patch, HIVE-8225.inprogress.patch, HIVE-8225.inprogress.patch, HIVE-8225.patch > > > The result changes to as if the union didn't have count() inside. The issue can be fixed by using srcunion.value outside the subquery in count (replace count(1) with count(srcunion.value)). Otherwise, it looks like count(1) node from union-ed queries is not present in AST at all, which might cause this result. > -Interestingly, adding group by to each query in a union produces completely weird result (count(1) is 309 for each key, whereas it should be 1 and the "logical" incorrect value if internal count is lost is 500)- Nm, that groups by table column called key, which is weird but is what Hive does -- This message was sent by Atlassian JIRA (v6.3.4#6332)