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.

Doc bug regarding NDV and COUNT(DISTINCT)

Highlighted

Doc bug regarding NDV and COUNT(DISTINCT)

Explorer

Hey there, noticed a doc bug on the page at 

http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/Installing-and-Using-Im...

 

This text:

If you do not need precise accuracy, you can produce an estimate of the distinct values for a column by specifying COUNT(NDV(column)); a query can contain multiple instances of COUNT(NDV(column)).

 

Should be

If you do not need precise accuracy, you can produce an estimate of the distinct values for a column by specifying NDV(column); a query can contain multiple instances of NDV(column).

 

COUNT(NDV(column)) will return an error like this:

 

> select count(ndv(user_id)) from table;

Error: AnalysisException: aggregate function cannot contain aggregate parameters: count(ndv(user_id)) (state=HY000,code=0)

 

1 REPLY 1

Re: Doc bug regarding NDV and COUNT(DISTINCT)

Contributor

Thanks for letting us know. This will be fixed in the next doc rev.

Don't have an account?
Coming from Hortonworks? Activate your account here