Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> how to compute histogram on non-numeric data set?


Copy link to this message
-
Re: how to compute histogram on non-numeric data set?
Is that not just a COUNT(1) and a GROUP BY?

Phil.

2012/3/12 Richard <[EMAIL PROTECTED]>:
> I have noticed histogram_numeric(col, n), but it seems to require numeric
> column.
> I have a string column, they are numeric like string but are category label,
> e.g,
>
> 100001, 200034
>
> two different strings are two different category but the numeric value does
> not mean anything,
> so it is not proper to use histogram_numeric(cast(col to BIGINT), n).
>
> thanks.
> Richard
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB