Reply
New Contributor
Posts: 2
Registered: ‎02-15-2016

Not yet supported place for UDAF 'count' on Tutorial Exercise 2

 on the Tutorial Exercise 2 the next query not works when the line "order by count(*);" is included

(on Hive Editor and cloudera-quickstart-vm-5.5.0-0-vmware)

 

select count(*), url from tokenized_access_logs
where url like '%\/product\/%'
group by url
order by count(*);

 

the error showed is:

Error while compiling statement: FAILED: SemanticException [Error 10128]: Line 4:9 Not yet supported place for UDAF 'count'

 

Cloudera Employee
Posts: 27
Registered: ‎11-04-2015

Re: Not yet supported place for UDAF 'count' on Tutorial Exercise 2

Hi,

 

Thank you for reporting this. You are right, the query fails with that error message, the correct query should be like:

 

select count(*) as cnt, url from tokenized_access_logs
where url like '%\/product\/%'
group by url
order by cnt desc;

 

I will file this to be corrected in the tutorial.

 

Thanks again and cheers,

Miklos

 

Miklos Szurap

Customer Operations Engineer, Cloudera

 

Cloudera Employee
Posts: 435
Registered: ‎07-12-2013

Re: Not yet supported place for UDAF 'count' on Tutorial Exercise 2

That part of the tutorial has you use the Impala query editor - the query should work in Impala's particular flavor of the query language.

New Contributor
Posts: 2
Registered: ‎05-09-2017

Re: Not yet supported place for UDAF 'count' on Tutorial Exercise 2

I think the perfect query will use replace function to remove '%' in the url

 

select count(*) as cnt,regexp_replace(url,'%','') as urlt
from tokenized_access_logs
where url like '%\/product\/%'
group by url
order by cnt desc;

 

 

Highlighted
New Contributor
Posts: 2
Registered: ‎05-09-2017

Re: Not yet supported place for UDAF 'count' on Tutorial Exercise 2

Just adding replace function to remove '%' from the URL:
select count(*) as cnt,regexp_replace(url,'%','') as urlt
from tokenized_access_logs
where url like '%\/product\/%'
group by url
order by cnt desc;
Announcements