You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Naresh P R (Jira)" <ji...@apache.org> on 2021/04/30 19:25:00 UTC

[jira] [Created] (HIVE-25084) Incorrect aggregate results on bucketed table

Naresh P R created HIVE-25084:
---------------------------------

             Summary: Incorrect aggregate results on bucketed table
                 Key: HIVE-25084
                 URL: https://issues.apache.org/jira/browse/HIVE-25084
             Project: Hive
          Issue Type: Bug
            Reporter: Naresh P R


Steps to repro
{code:java}
CREATE TABLE test_table(
col1 int,
col2 char(32),
col3 varchar(3))
CLUSTERED BY (col2)
 SORTED BY (
   col2 ASC,
   col3 ASC,
   col1 ASC)
 INTO 32 BUCKETS stored as orc;

set hive.query.results.cache.enabled=false;
insert into test_table values(2, "123456", "15");
insert into test_table values(1, "123456", "15");

SELECT col2, col3, max(col1) AS max_sequence FROM test_table GROUP BY col2, col3;
==> LocalFetch correct result <==
123456 15 2 

==> Wrong result with Tez/Llap <==
set hive.fetch.task.conversion=none;
123456 15 2 
123456 15 1 

==> Correct result with Tez/Llap disabling map aggregation <==
set hive.map.aggr=false;
123456 15 2 
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)