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 2021/05/17 14:52:51 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #32557: [SPARK-35411][SQL] Add essential information while serializing TreeNode to json

cloud-fan commented on a change in pull request #32557:
URL: https://github.com/apache/spark/pull/32557#discussion_r633602491



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
##########
@@ -1001,6 +1001,9 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product with Tre
     case t: Seq[_] if t.forall(_.isInstanceOf[TreeNode[_]]) ||
       t.forall(_.isInstanceOf[Partitioning]) || t.forall(_.isInstanceOf[DataType]) =>
       JArray(t.map(parseToJson).toList)
+    // Scan Seq[Product] to make sure essential information can be written out.
+    case t: Seq[_] if t.forall(_.isInstanceOf[Product]) =>

Review comment:
       shall we merge it into the previous case? `case t: Seq[_] if t.forall(_.isInstanceOf[TreeNode[_]]) || ...|| t.forall(_.isInstanceOf[Product])`




-- 
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:
users@infra.apache.org



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