hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Min Zhou (JIRA)" <>
Subject [jira] Commented: (HIVE-474) Support for distinct selection on two or more columns
Date Mon, 15 Jun 2009 02:04:07 GMT


Min Zhou commented on HIVE-474:

I thought there is another special case here.  If the query has multiple distinct operations
on the same column , we can push down the evaluation of those expressions into reducers.

  select a, count(distinct if(codition, b, null)) as col1, count(distinct if(!condition, null,
b)) as col2, count(distinct b) as col3

  Job :
    Map side:
      Emit: distribution_key: a, sort_key: a, b, value: nothing
    Reduce side:
      Group By
        a,  count col1, col2, col3 by evaluating their expressions

> Support for distinct selection on two or more columns
> -----------------------------------------------------
>                 Key: HIVE-474
>                 URL:
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Alexis Rondeau
> The ability to select distinct several, individual columns as by example: 
> select count(distinct user), count(distinct session) from actions;   
> Currently returns the following failure: 
> FAILED: Error in semantic analysis: line 2:7 DISTINCT on Different Columns not Supported

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message