richox commented on code in PR #1438:
URL: https://github.com/apache/auron/pull/1438#discussion_r2451120424
##########
spark-extension-shims-spark3/src/test/scala/org/apache/spark/sql/auron/AuronCheckConvertShuffleExchangeSuite.scala:
##########
@@ -75,21 +78,38 @@ class AuronCheckConvertShuffleExchangeSuite
.config("spark.memory.offHeap.enabled", "false")
.config("spark.auron.enable", "true")
.getOrCreate()
- spark.sql("drop table if exists test_shuffle")
- spark.sql(
- "create table if not exists test_shuffle using parquet PARTITIONED BY
(part) as select 1 as c1, 2 as c2, 'test test' as part")
+ Seq((1, 2, "test test")).toDF("c1", "c2",
"part").createOrReplaceTempView("test_shuffle")
val executePlan =
- spark.sql("select c1, count(1) from test_shuffle group by c1")
+ spark
+ .sql("select c1, count(1) from test_shuffle group by c1")
+ .queryExecution
+ .executedPlan
+ .asInstanceOf[AdaptiveSparkPlanExec]
val shuffleExchangeExec =
- executePlan.queryExecution.executedPlan
+ executePlan.executedPlan
.collectFirst { case shuffleExchangeExec: ShuffleExchangeExec =>
shuffleExchangeExec
}
- val afterConvertPlan =
AuronConverters.convertSparkPlan(shuffleExchangeExec.get)
- assert(afterConvertPlan.isInstanceOf[ShuffleExchangeExec])
- checkAnswer(executePlan, Seq(Row(1, 1)))
+ var checkAssertError = false
+ try {
+
AuronColumnarOverrides.apply(spark).preColumnarTransitions(shuffleExchangeExec.get)
+ } catch {
+ case e: AssertionError =>
+ assert(!e.getMessage.equals(
Review Comment:
we should look for a more eligible way to do the checking. this string
comparison does not make sense and it is hard to maintain in the future.
--
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]