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 B31CF1088E for ; Wed, 6 Nov 2013 03:44:31 +0000 (UTC) Received: (qmail 73726 invoked by uid 500); 6 Nov 2013 03:44:23 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 73540 invoked by uid 500); 6 Nov 2013 03:44:20 -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 73504 invoked by uid 500); 6 Nov 2013 03:44:19 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 73494 invoked by uid 99); 6 Nov 2013 03:44:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Nov 2013 03:44:19 +0000 Date: Wed, 6 Nov 2013 03:44:18 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-5657) TopN produces incorrect results with count(distinct) 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-5657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Shelukhin updated HIVE-5657: ----------------------------------- Attachment: HIVE-5657.02.patch Rebased and added vectorized handling. I got a little bit carried away and added bunch of comments and renames i, j, index variables to be more specific. > TopN produces incorrect results with count(distinct) > ---------------------------------------------------- > > Key: HIVE-5657 > URL: https://issues.apache.org/jira/browse/HIVE-5657 > Project: Hive > Issue Type: Bug > Reporter: Sergey Shelukhin > Assignee: Navis > Priority: Critical > Attachments: D13797.1.patch, D13797.2.patch, HIVE-5657.02.patch, HIVE-5657.1.patch.txt, example.patch > > > Attached patch illustrates the problem. > limit_pushdown test has various other cases of aggregations and distincts, incl. count-distinct, that work correctly (that said, src dataset is bad for testing these things because every count, for example, produces one record only), so something must be special about this. > I am not very familiar with distinct- code and these nuances; if someone knows a quick fix feel free to take this, otherwise I will probably start looking next week. -- This message was sent by Atlassian JIRA (v6.1#6144)