You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/17 06:59:16 UTC

[GitHub] viirya commented on a change in pull request #23810: [SPARK-26901][SQL][R] Avoid to prune columns for vectorized gapply()

viirya commented on a change in pull request #23810: [SPARK-26901][SQL][R] Avoid to prune columns for vectorized gapply()
URL: https://github.com/apache/spark/pull/23810#discussion_r257490810
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ##########
 @@ -651,6 +651,10 @@ object ColumnPruning extends Rule[LogicalPlan] {
     // Can't prune the columns on LeafNode
     case p @ Project(_, _: LeafNode) => p
 
+    // Vectorized gapply in R should not prune columns because all referred fields
+    // can be used within given R native function.
+    case p @ Project(_, _: FlatMapGroupsInRWithArrow) => p
 
 Review comment:
   Before this, is `FlatMapGroupsInRWithArrow` be considered to use only grouping column? For example, in the example of PR description, the column `gear`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org