wezhang commented on a change in pull request #32557:
URL: https://github.com/apache/spark/pull/32557#discussion_r633981777



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
##########
@@ -997,9 +997,11 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] 
extends Product with Tre
         ("deserialized" -> s.deserialized) ~ ("replication" -> s.replication)
     case n: TreeNode[_] => n.jsonValue
     case o: Option[_] => o.map(parseToJson)
-    // Recursive scan Seq[TreeNode], Seq[Partitioning], Seq[DataType]
+    // Recursive scan Seq[TreeNode], Seq[Partitioning], Seq[DataType], 
Seq[Product]
     case t: Seq[_] if t.forall(_.isInstanceOf[TreeNode[_]]) ||
-      t.forall(_.isInstanceOf[Partitioning]) || 
t.forall(_.isInstanceOf[DataType]) =>
+      t.forall(_.isInstanceOf[Partitioning]) ||
+      t.forall(_.isInstanceOf[DataType]) ||
+      t.forall(_.isInstanceOf[Product]) =>

Review comment:
       The `TreeNode` inherits `Product`, I'm wondering if only one check 
should be kept.
   
   Maybe this change is redundant, the following one which changes `case p if 
p.productIterator.exists(_.isInstanceOf[TreeNode[_]]) => true` is the key one.
   
   




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