You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ankita Kapratwar (JIRA)" <ji...@apache.org> on 2018/03/16 17:52:00 UTC
[jira] [Created] (HIVE-18980) Hive not returning expected results
Ankita Kapratwar created HIVE-18980:
---------------------------------------
Summary: Hive not returning expected results
Key: HIVE-18980
URL: https://issues.apache.org/jira/browse/HIVE-18980
Project: Hive
Issue Type: Bug
Components: Hive
Affects Versions: 1.2.1
Reporter: Ankita Kapratwar
Steps to reproduce:
{code}
create table test (id int, val string);
insert into test values(1, "one");
insert into test values(2, "two");
insert into test values(3, "three");
SELECT Count(*) AS `Count`
FROM (select * from test) `a`
limit 2
OUTPUT>>> 3 --this is ok!
SELECT Count(*) AS `Count`
FROM (select * from test order by `val` DESC) `a`
limit 2
OUTPUT>>> 2 --this is not ok!
SELECT count(*), Count(distinct val) AS `Count`
FROM (select * from test order by `val` DESC) `a`
limit 2
OUTPUT>>> 3 3 --back to ok!
{code}
WORKAROUND:
Set the following properties before query execution
set hive.groupby.skewindata=true;
set hive.optimize.reducededuplication=true;
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)