sigmod commented on a change in pull request #32451:
URL: https://github.com/apache/spark/pull/32451#discussion_r627952214



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/objects.scala
##########
@@ -207,7 +211,8 @@ object ObjectSerializerPruning extends Rule[LogicalPlan] {
     }
   }
 
-  def apply(plan: LogicalPlan): LogicalPlan = plan transform {
+  def apply(plan: LogicalPlan): LogicalPlan = plan.transformWithPruning(
+    _.containsAllPatterns(OBJECT_CONSUMER, PROJECT), ruleId) {

Review comment:
       @gengliangwang  Using OBJECT_CONSUMER didn't affect correctness of the 
rule, because ObjectConsumer is a super class of SerializeFromObject, which 
means the bit for OBJECT_CONSUMER was always set if there's a 
SerializeFromObject in the subtree or expressions.  It was an optimization to 
save the number of needed bits.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to