zhengruifeng commented on code in PR #38130:
URL: https://github.com/apache/spark/pull/38130#discussion_r995618291
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/AttachDistributedSequenceExec.scala:
##########
@@ -40,15 +42,45 @@ case class AttachDistributedSequenceExec(
override def outputPartitioning: Partitioning = child.outputPartitioning
+ @transient private var cached: RDD[InternalRow] = _
+
override protected def doExecute(): RDD[InternalRow] = {
- val childRDD = child.execute().map(_.copy())
- val checkpointed = if (childRDD.getNumPartitions > 1) {
- // to avoid execute multiple jobs. zipWithIndex launches a Spark job.
- childRDD.localCheckpoint()
+ val childRDD = child.execute()
Review Comment:
I guess we should avoid using `checkpoint` even if AQE is disabled, just
because it is unreliable: a local checkpointed rdd can not be recomputed if it
is unfortunately evicted from memory, or due to something like dynamic
allocation.
if we want to support checkpointing here, what about adding
`localcheckpoint` and `checkpoint` as new options in this new configration?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]