cloud-fan commented on code in PR #53817:
URL: https://github.com/apache/spark/pull/53817#discussion_r2828606188
##########
sql/core/src/test/scala/org/apache/spark/sql/ExplainSuite.scala:
##########
@@ -941,6 +941,102 @@ class ExplainSuiteAE extends ExplainSuiteHelper with
EnableAdaptiveExecutionSuit
results = results.replaceAll("#\\d+", "#x").replaceAll("plan_id=\\d+",
"plan_id=x")
assert(results == expectedTree)
}
+
+ test("SPARK-55052: Verify exposed AQEShuffleRead properties (coalesced and
coalesced-skewed) " +
+ "in Physical Plan Tree") {
+ withSQLConf(
+ SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true",
+ SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1",
+ SQLConf.SKEW_JOIN_SKEWED_PARTITION_THRESHOLD.key -> "100",
+ SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES.key -> "100",
+ SQLConf.SHUFFLE_PARTITIONS.key -> "10") {
+ withTempView("view1", "skewDataView2") {
+ spark
+ .range(0, 1000, 1, 10)
+ .selectExpr("id % 10 as key1")
+ .createOrReplaceTempView("view1")
+ spark
+ .range(0, 200, 1, 10)
+ .selectExpr("id % 1 as key2")
+ .createOrReplaceTempView("skewDataView2")
+
+ val df = spark.sql("SELECT key1 FROM view1 JOIN skewDataView2 ON key1
= key2")
+ df.collect()
+ val explainPlanString =
df.queryExecution.explainString(ExplainMode.fromString("FORMATTED"))
+
+ assert(explainPlanString.contains(
Review Comment:
can we follow other tests in this file and use
`checkKeywordsExistsInExplain`?
--
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]