You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/10/22 17:56:30 UTC

[GitHub] [arrow-datafusion] xudong963 opened a new pull request #1167: DataFrame supports window function

xudong963 opened a new pull request #1167:
URL: https://github.com/apache/arrow-datafusion/pull/1167


   # Which issue does this PR close?
   
   
   Closes https://github.com/apache/arrow-datafusion/issues/1147
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] xudong963 commented on a change in pull request #1167: DataFrame supports window function

Posted by GitBox <gi...@apache.org>.
xudong963 commented on a change in pull request #1167:
URL: https://github.com/apache/arrow-datafusion/pull/1167#discussion_r736049887



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -840,24 +839,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
 
     /// Wrap a plan in a window
     fn window(&self, input: LogicalPlan, window_exprs: Vec<Expr>) -> Result<LogicalPlan> {

Review comment:
       nice caught!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] houqp commented on a change in pull request #1167: DataFrame supports window function

Posted by GitBox <gi...@apache.org>.
houqp commented on a change in pull request #1167:
URL: https://github.com/apache/arrow-datafusion/pull/1167#discussion_r735811776



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -840,24 +839,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
 
     /// Wrap a plan in a window
     fn window(&self, input: LogicalPlan, window_exprs: Vec<Expr>) -> Result<LogicalPlan> {

Review comment:
       perhaps we could get rid of this function as well since it now just does a single function call :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] Jimexist commented on a change in pull request #1167: DataFrame supports window function

Posted by GitBox <gi...@apache.org>.
Jimexist commented on a change in pull request #1167:
URL: https://github.com/apache/arrow-datafusion/pull/1167#discussion_r736061306



##########
File path: datafusion/src/logical_plan/builder.rs
##########
@@ -327,7 +328,29 @@ impl LogicalPlanBuilder {
 
         Ok(Self::from(table_scan))
     }
-
+    /// Wrap a plan in a window
+    pub fn window_plan(

Review comment:
       can this be crate public?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] Jimexist commented on pull request #1167: DataFrame supports window function

Posted by GitBox <gi...@apache.org>.
Jimexist commented on pull request #1167:
URL: https://github.com/apache/arrow-datafusion/pull/1167#issuecomment-950340258


   it might be worthwhile to note down the code duplication here - i did plan to optimize for reordering of sorts in future if multiple window functions exist.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] xudong963 commented on pull request #1167: DataFrame supports window function

Posted by GitBox <gi...@apache.org>.
xudong963 commented on pull request #1167:
URL: https://github.com/apache/arrow-datafusion/pull/1167#issuecomment-950985454


   Thanks for your comments, I encapsulated redundant code in `LogicalPlanBuilder`. PTAL @Jimexist @houqp 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] Jimexist merged pull request #1167: DataFrame supports window function

Posted by GitBox <gi...@apache.org>.
Jimexist merged pull request #1167:
URL: https://github.com/apache/arrow-datafusion/pull/1167


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org