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 4CC1810B77 for ; Thu, 31 Oct 2013 01:56:26 +0000 (UTC) Received: (qmail 11040 invoked by uid 500); 31 Oct 2013 01:56:25 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 10990 invoked by uid 500); 31 Oct 2013 01:56:25 -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 10979 invoked by uid 500); 31 Oct 2013 01:56:25 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 10975 invoked by uid 99); 31 Oct 2013 01:56:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Oct 2013 01:56:25 +0000 Date: Thu, 31 Oct 2013 01:56:25 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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:comment-tabpanel&focusedCommentId=13809846#comment-13809846 ] Sergey Shelukhin commented on HIVE-5657: ---------------------------------------- but the hash for distinct in the review always returns FORWARD in current patch on FB: {code} class HashForDistinct extends HashForGroup { HashForDistinct(int topN, long threshold, BinaryCollector collector) { super(topN, threshold, collector); } @Override protected int index(int index) { return FORWARD; } } {code} > 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, example.patch, HIVE-5657.1.patch.txt > > > 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)