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

Xiao Li commented on SPARK-12718:
---------------------------------

select key, value, avg(c_int) over (partition by key), sum(c_float) 
over(partition by value) from t1
->
select key, value, avg(c_int), t2._w0 over (partition by key) from (select key, 
value, sum(c_float) over(partition by value) as _w0 from t1 where value < 10) t2

When window specifications are different, we will split the whole one to 
multiple. However, to do it, we need to have the corresponding optimizer rule 
to combine them back. Let me check if we need to add a rule. 

In addition, I plan to add the predicate pushdown for window into Optimizer 
first. This is still missing now. I also found Hive just added one. Thanks!

> SQL generation support for window functions
> -------------------------------------------
>
>                 Key: SPARK-12718
>                 URL: https://issues.apache.org/jira/browse/SPARK-12718
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Cheng Lian
>            Assignee: Xiao Li
>
> {{HiveWindowFunctionQuerySuite}} and {{HiveWindowFunctionQueryFileSuite}} can 
> be useful for bootstrapping test coverage. Please refer to SPARK-11012 for 
> more details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to