maryannxue commented on a change in pull request #23531:
URL: https://github.com/apache/spark/pull/23531#discussion_r416872953



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala
##########
@@ -253,6 +257,143 @@ case class FilterExec(condition: Expression, child: 
SparkPlan)
   }
 }
 
+/**
+ * Physical plan node for a recursive relation that encapsulates the physical 
plan of the anchor
+ * term and the logical plan of the recursive term.
+ *
+ * Anchor is used to initialize the query in the first run.
+ * Recursive term is used to extend the result with new rows, They are logical 
plans and contain
+ * references to the result of the previous iteration or to the so far 
accumulated result. These
+ * references are updated with new statistics and data and then compiled to 
physical plan before
+ * execution.
+ *
+ * The execution terminates once the anchor term or an iteration of the 
recursive term return no
+ * rows.
+ *
+ * @param cteName the name of the recursive relation
+ * @param anchorTerm this child is used for initializing the query
+ * @param output the attributes of the recursive relation
+ */
+case class RecursiveRelationExec(
+    cteName: String,
+    anchorTerm: SparkPlan,
+    output: Seq[Attribute]) extends SparkPlan {
+  @transient
+  lazy val logicalRecursiveTerm = 
logicalLink.get.asInstanceOf[RecursiveRelation].recursiveTerm

Review comment:
       I think a `transient` member would do




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



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

Reply via email to