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 2018/12/19 00:15:18 UTC
[GitHub] gatorsmile commented on a change in pull request #23343:
[SPARK-26390][SQL] ColumnPruning rule should only do column pruning
gatorsmile commented on a change in pull request #23343: [SPARK-26390][SQL] ColumnPruning rule should only do column pruning
URL: https://github.com/apache/spark/pull/23343#discussion_r242753230
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -602,17 +606,11 @@ object ColumnPruning extends Rule[LogicalPlan] {
p.copy(child = w.copy(
windowExpressions = w.windowExpressions.filter(p.references.contains)))
- // Eliminate no-op Window
- case w: Window if w.windowExpressions.isEmpty => w.child
-
- // Eliminate no-op Projects
- case p @ Project(_, child) if child.sameOutput(p) => child
-
// Can't prune the columns on LeafNode
case p @ Project(_, _: LeafNode) => p
// for all other logical plans that inherits the output from it's children
- case p @ Project(_, child) =>
+ case p @ Project(_, child) if !child.isInstanceOf[Project] =>
Review comment:
This requires a code comment. I believe the others will ask the same q when we read the problem again.
----------------------------------------------------------------
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