pan3793 commented on code in PR #42639:
URL: https://github.com/apache/spark/pull/42639#discussion_r1304027245
##########
sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala:
##########
@@ -522,146 +522,152 @@ class CachedTableSuite extends QueryTest with
SQLTestUtils
}
test("A cached table preserves the partitioning and ordering of its cached
SparkPlan") {
- val table3x = testData.union(testData).union(testData)
- table3x.createOrReplaceTempView("testData3x")
-
- sql("SELECT key, value FROM testData3x ORDER BY
key").createOrReplaceTempView("orderedTable")
- spark.catalog.cacheTable("orderedTable")
- assertCached(spark.table("orderedTable"))
- // Should not have an exchange as the query is already sorted on the group
by key.
- verifyNumExchanges(sql("SELECT key, count(*) FROM orderedTable GROUP BY
key"), 0)
- checkAnswer(
- sql("SELECT key, count(*) FROM orderedTable GROUP BY key ORDER BY key"),
- sql("SELECT key, count(*) FROM testData3x GROUP BY key ORDER BY
key").collect())
- uncacheTable("orderedTable")
- spark.catalog.dropTempView("orderedTable")
-
- // Set up two tables distributed in the same way. Try this with the data
distributed into
- // different number of partitions.
- for (numPartitions <- 1 until 10 by 4) {
+ // Set MAX_SINGLE_PARTITION_BYTES to Long.MaxValue to avoid inserting
Exchange node
Review Comment:
No, still valid. With `MAX_SINGLE_PARTITION_BYTES=128m`, the assertion in
`verifyNumExchanges` may fail because it may insert new Exchange nodes.
--
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]