You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Raihan Jamal <ja...@gmail.com> on 2012/08/14 23:33:19 UTC

count(*) vs count(1) in hive

Is there any difference between count(*) and count(1) in Hive. And which
one should we use in general and why?
Given that I am on Hive 0.6 version.



*Raihan Jamal*

Re: count(*) vs count(1) in hive

Posted by Bertrand Dechoux <de...@gmail.com>.
count(1) is the old one
count(*) is the new one

see https://issues.apache.org/jira/browse/HIVE-287

I guess when you can use the newer, you should use it.

Bertrand

On Tue, Aug 14, 2012 at 11:33 PM, Raihan Jamal <ja...@gmail.com>wrote:

> Is there any difference between count(*) and count(1) in Hive. And which
> one should we use in general and why?
> Given that I am on Hive 0.6 version.
>
>
>
> *Raihan Jamal*
>



-- 
Bertrand Dechoux