Skip to content

Commit

Permalink
fix failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
zjuwangg committed Mar 11, 2024
1 parent 4dd956b commit e412421
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.apache.spark.sql

import org.apache.spark.sql.catalyst.plans.logical
import org.apache.spark.sql.catalyst.plans.physical.RoundRobinPartitioning
import org.apache.spark.sql.catalyst.util.{sideBySide, stackTraceToString}
import org.apache.spark.sql.execution.SQLExecution

Expand Down Expand Up @@ -112,7 +113,8 @@ object GlutenQueryTest extends Assertions {
df: DataFrame,
expectedAnswer: Seq[Row],
checkToRDD: Boolean = true): Option[String] = {
val isSorted = df.logicalPlan.collect { case s: logical.Sort => s }.nonEmpty
val isSorted = df.logicalPlan.collect { case s: logical.Sort => s }.nonEmpty &&
df.logicalPlan.collect { case rr: logical.Repartition => rr }.isEmpty
if (checkToRDD) {
SQLExecution.withSQLConfPropagated(df.sparkSession) {
df.rdd.count() // Also attempt to deserialize as an RDD [SPARK-15791]
Expand Down

0 comments on commit e412421

Please sign in to comment.