[jira] [Updated] (SPARK-32096) Support top-N sort for Spark SQL rank window function

2020-06-25 Thread Hyukjin Kwon (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-32096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon updated SPARK-32096:
-
Fix Version/s: (was: 3.1.0)

> Support top-N sort for Spark SQL rank window function
> -
>
> Key: SPARK-32096
> URL: https://issues.apache.org/jira/browse/SPARK-32096
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.0
> Environment: Any environment that supports Spark.
>Reporter: Zikun
>Priority: Major
>
> In Spark SQL, there are two types of sort execution, *_SortExec_* and 
> *_TakeOrderedAndProjectExec_* . 
> *_SortExec_* is a general sorting execution and it does not support top-N 
> sort. ​
> *_TakeOrderedAndProjectExec_* is the execution for top-N sort in Spark. 
> Spark SQL rank window function needs to sort the data locally and it relies 
> on the execution plan *_SortExec_* to sort the data in each physical data 
> partition. When the filter of the window rank (e.g. rank <= 100) is specified 
> in a user's query, the filter can actually be pushed down to the SortExec and 
> then we let SortExec operates top-N sort. 
> Right now SortExec does not support top-N sort and we need to extend the 
> capability of SortExec to support top-N sort. 
> Or if SortExec is not considered as the right execution choice, we can create 
> a new execution plan called topNSortExec to do top-N sort in each local 
> partition if a filter on the window rank is specified. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SPARK-32096) Support top-N sort for Spark SQL rank window function

2020-06-25 Thread Hyukjin Kwon (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-32096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon updated SPARK-32096:
-
Target Version/s:   (was: 3.1.0)

> Support top-N sort for Spark SQL rank window function
> -
>
> Key: SPARK-32096
> URL: https://issues.apache.org/jira/browse/SPARK-32096
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.0
> Environment: Any environment that supports Spark.
>Reporter: Zikun
>Priority: Major
> Fix For: 3.1.0
>
>
> In Spark SQL, there are two types of sort execution, *_SortExec_* and 
> *_TakeOrderedAndProjectExec_* . 
> *_SortExec_* is a general sorting execution and it does not support top-N 
> sort. ​
> *_TakeOrderedAndProjectExec_* is the execution for top-N sort in Spark. 
> Spark SQL rank window function needs to sort the data locally and it relies 
> on the execution plan *_SortExec_* to sort the data in each physical data 
> partition. When the filter of the window rank (e.g. rank <= 100) is specified 
> in a user's query, the filter can actually be pushed down to the SortExec and 
> then we let SortExec operates top-N sort. 
> Right now SortExec does not support top-N sort and we need to extend the 
> capability of SortExec to support top-N sort. 
> Or if SortExec is not considered as the right execution choice, we can create 
> a new execution plan called topNSortExec to do top-N sort in each local 
> partition if a filter on the window rank is specified. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SPARK-32096) Support top-N sort for Spark SQL rank window function

2020-06-24 Thread Zikun (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-32096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zikun updated SPARK-32096:
--
Description: 
In Spark SQL, there are two types of sort execution, *_SortExec_* and 
*_TakeOrderedAndProjectExec_* . 

*_SortExec_* is a general sorting execution and it does not support top-N sort. 
​

*_TakeOrderedAndProjectExec_* is the execution for top-N sort in Spark. 

Spark SQL rank window function needs to sort the data locally and it relies on 
the execution plan *_SortExec_* to sort the data in each physical data 
partition. When the filter of the window rank (e.g. rank <= 100) is specified 
in a user's query, the filter can actually be pushed down to the SortExec and 
then we let SortExec operates top-N sort. 

Right now SortExec does not support top-N sort and we need to extend the 
capability of SortExec to support top-N sort. 

Or if SortExec is not considered as the right execution choice, we can create a 
new execution plan called topNSortExec to do top-N sort in each local partition 
if a filter on the window rank is specified. 

  was:
In Spark SQL, there are two types of sort execution, *_SortExec_* and 
*_TakeOrderedAndProjectExec_* . 

*_SortExec_* is a general sorting execution and it does not support top-N sort. 
​

*_TakeOrderedAndProjectExec_* is the execution for top-N sort in Spark. 

Spark SQL rank window function needs to sort the data locally and it relies on 
the execution plan *_SortExec_* to sort the data in each physical data 
partition. When the filter of the window rank (e.g. rank <= 100) is specified 
in a user's query, the filter can actually be pushed down to the SortExec and 
then we let SortExec operates top-N sort. 

Right now SortExec does not support top-N sort and we need to extend the 
capability of SortExec to support top-N sort. 

Or if SortExec is not considered as the right execution choice, we can create a 
new execution plan called topNSortExec to do top-N sort in each local partition 
if a filter on the rank is specified. 


> Support top-N sort for Spark SQL rank window function
> -
>
> Key: SPARK-32096
> URL: https://issues.apache.org/jira/browse/SPARK-32096
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.0
> Environment: Any environment that supports Spark.
>Reporter: Zikun
>Priority: Major
> Fix For: 3.1.0
>
>
> In Spark SQL, there are two types of sort execution, *_SortExec_* and 
> *_TakeOrderedAndProjectExec_* . 
> *_SortExec_* is a general sorting execution and it does not support top-N 
> sort. ​
> *_TakeOrderedAndProjectExec_* is the execution for top-N sort in Spark. 
> Spark SQL rank window function needs to sort the data locally and it relies 
> on the execution plan *_SortExec_* to sort the data in each physical data 
> partition. When the filter of the window rank (e.g. rank <= 100) is specified 
> in a user's query, the filter can actually be pushed down to the SortExec and 
> then we let SortExec operates top-N sort. 
> Right now SortExec does not support top-N sort and we need to extend the 
> capability of SortExec to support top-N sort. 
> Or if SortExec is not considered as the right execution choice, we can create 
> a new execution plan called topNSortExec to do top-N sort in each local 
> partition if a filter on the window rank is specified. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SPARK-32096) Support top-N sort for Spark SQL rank window function

2020-06-24 Thread Zikun (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-32096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zikun updated SPARK-32096:
--
Summary: Support top-N sort for Spark SQL rank window function  (was: 
Support top-N sort for Spark SQL window function)

> Support top-N sort for Spark SQL rank window function
> -
>
> Key: SPARK-32096
> URL: https://issues.apache.org/jira/browse/SPARK-32096
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 3.0.0
> Environment: Any environment that supports Spark.
>Reporter: Zikun
>Priority: Major
> Fix For: 3.1.0
>
>
> In Spark SQL, there are two types of sort execution, *_SortExec_* and 
> *_TakeOrderedAndProjectExec_* . 
> *_SortExec_* is a general sorting execution and it does not support top-N 
> sort. ​
> *_TakeOrderedAndProjectExec_* is the execution for top-N sort in Spark. 
> Spark SQL rank window function needs to sort the data locally and it relies 
> on the execution plan *_SortExec_* to sort the data in each physical data 
> partition. When the filter of the window rank (e.g. rank <= 100) is specified 
> in a user's query, the filter can actually be pushed down to the SortExec and 
> then we let SortExec operates top-N sort. 
> Right now SortExec does not support top-N sort and we need to extend the 
> capability of SortExec to support top-N sort. 
> Or if SortExec is not considered as the right execution choice, we can create 
> a new execution plan called topNSortExec to do top-N sort in each local 
> partition if a filter on the rank is specified. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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