cloud-fan commented on code in PR #40390:
URL: https://github.com/apache/spark/pull/40390#discussion_r1302533010


##########
sql/core/src/test/scala/org/apache/spark/sql/DatasetCacheSuite.scala:
##########
@@ -279,34 +280,36 @@ class DatasetCacheSuite extends QueryTest
     val df2 = Seq(2 -> 2).toDF("i", "j")
     val df3 = Seq(3 -> 3).toDF("i", "j")
 
-    withClue("positive: union by position") {
-      val unionDf = df1.union(df2).select($"i")
-      unionDf.cache()
-      val finalDf = unionDf.union(df3.select($"i"))
-      
assert(finalDf.queryExecution.executedPlan.exists(_.isInstanceOf[InMemoryTableScanExec]))
-    }
+    withSQLConf(SQLConf.CAN_CHANGE_CACHED_PLAN_OUTPUT_PARTITIONING.key -> 
"false") {
+      withClue("positive: union by position") {
+        val unionDf = df1.union(df2).select($"i")
+        unionDf.cache()
+        val finalDf = unionDf.union(df3.select($"i"))
+        
assert(finalDf.queryExecution.executedPlan.exists(_.isInstanceOf[InMemoryTableScanExec]))

Review Comment:
   shall we add a helper function `def exists` for AQE plan checking, so that 
we don't need to disable `CAN_CHANGE_CACHED_PLAN_OUTPUT_PARTITIONING` here?



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