ulysses-you commented on code in PR #39624:
URL: https://github.com/apache/spark/pull/39624#discussion_r1122540408


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryTableScanExec.scala:
##########
@@ -166,4 +170,32 @@ case class InMemoryTableScanExec(
   protected override def doExecuteColumnar(): RDD[ColumnarBatch] = {
     columnarInputRDD
   }
+
+  // ==================================================================
+  // Methods for AQE
+  // ==================================================================
+
+  @transient
+  private lazy val future: FutureAction[Unit] = {
+    val rdd = cachedPlan.execute()
+    sparkContext.submitJob(
+      rdd,
+      (_: Iterator[InternalRow]) => (),
+      (0 until rdd.getNumPartitions).toSeq,
+      (_: Int, _: Unit) => (),
+      ()
+    )
+  }
+
+  override def isMaterialized: Boolean = relation.isMaterialized || 
super.isMaterialized

Review Comment:
   If the `InMemoryTableScanExec` is materialized, we should not run a new job 
again. Add the check is to avoid AQE framework call `doMaterialize`.



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

Reply via email to