Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Fix aee #61

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class ExchangeCoordinator(
// number of post-shuffle partitions.
val partitionStartIndices =
if (mapOutputStatistics.length == 0) {
Array.empty[Int]
Array(0)
} else {
estimatePartitionStartIndices(mapOutputStatistics)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,4 +527,15 @@ class ExchangeCoordinatorSuite extends SparkFunSuite with BeforeAndAfterAll {
}
withSparkSession(test, 4, None)
}

test("SPARK-29284 adaptive query execution works correctly " +
"when first stage partitions size is 0") {
val test = { spark: SparkSession =>
spark.sql("SET spark.sql.adaptive.enabled=true")
spark.sql("SET spark.sql.shuffle.partitions=1")
val resultDf = spark.range(0).distinct().groupBy().count()
checkAnswer(resultDf, Row(0) :: Nil)
}
withSparkSession(test, 4, None)
}
}