[ 
https://issues.apache.org/jira/browse/SPARK-2226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14055455#comment-14055455
 ] 

Michael Armbrust commented on SPARK-2226:
-----------------------------------------

Regarding how to implement this: I think basically all we need is a new Rule 
that runs during analysis.  It will look for filters on top of aggregates that 
contain attributes that can't be resolved.  It can then insert the expression 
into the aggregate operator and then project it away above the filter.  Let me 
know if that makes sense or if you want to discuss further.

> HAVING should be able to contain aggregate expressions that don't appear in 
> the aggregation list. 
> --------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-2226
>                 URL: https://issues.apache.org/jira/browse/SPARK-2226
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 1.0.0
>            Reporter: Reynold Xin
>            Assignee: William Benton
>
> https://github.com/apache/hive/blob/trunk/ql/src/test/queries/clientpositive/having.q
> This test file contains the following query:
> {code}
> SELECT key FROM src GROUP BY key HAVING max(value) > "val_255";
> {code}
> Once we fixed this issue, we should whitelist having.q.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to