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 77D92200BD4 for ; Fri, 2 Dec 2016 02:22:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 76927160B0B; Fri, 2 Dec 2016 01:22:02 +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 E5FCC160B25 for ; Fri, 2 Dec 2016 02:22:01 +0100 (CET) Received: (qmail 88163 invoked by uid 500); 2 Dec 2016 01:22:00 -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 87933 invoked by uid 99); 2 Dec 2016 01:22:00 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 01:22:00 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 613672C2A6E for ; Fri, 2 Dec 2016 01:22:00 +0000 (UTC) Date: Fri, 2 Dec 2016 01:22:00 +0000 (UTC) From: "Pengcheng Xiong (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-13452) StatsOptimizer should return no rows on empty table with group by MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Dec 2016 01:22:02 -0000 [ https://issues.apache.org/jira/browse/HIVE-13452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pengcheng Xiong updated HIVE-13452: ----------------------------------- Status: Patch Available (was: Open) > StatsOptimizer should return no rows on empty table with group by > ----------------------------------------------------------------- > > Key: HIVE-13452 > URL: https://issues.apache.org/jira/browse/HIVE-13452 > Project: Hive > Issue Type: Bug > Components: Logical Optimizer > Reporter: Ashutosh Chauhan > Assignee: Pengcheng Xiong > Attachments: HIVE-13452.01.patch > > > {code} > create table t1 (a int); > analyze table t1 compute statistics; > analyze table t1 compute statistics for columns; > select count(1) from t1 group by 1; > set hive.compute.query.using.stats=true; > select count(1) from t1 group by 1; > {code} > In both cases result set should be empty. However, with statsoptimizer on Hive returns one row with value 0. -- This message was sent by Atlassian JIRA (v6.3.4#6332)