Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Inconsistent count results from Apache HIVE

Highlighted

Inconsistent count results from Apache HIVE

New Contributor

We have the latest Hortonworks's HDP, with Hive version (3.1.0)

I have a problem when trying to count the number of rows, on a given condition. The count (*) returns false value when executed side by side with a simple select on the same conditions

Example :

select *
from mydata
where product = "157536" and      date = "2019-03-05";

=> gives 34 rows

select count(*)
from mydata
where product = "157536" and      date = "2019-03-05";

=> gives a count of 9

After looking up on the net: i've tried

ANALYZE TABLE mydata COMPUTE STATISTICS; (before the count but to no avail)

also tried a repair table

also tried to play with these to params : hive.stats.autogather and hive.compute.query.using.stats => but nothing

Additional info : Hive is running with Tez