Skip to content
Open
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 @@ -67,10 +67,12 @@ class NativeRDD(
override def compute(split: Partition, context: TaskContext): Iterator[InternalRow] = {
val computingNativePlan = nativePlanWrapper.plan(split, context)

// SPARK-44605: Spark 4+ refines ShuffleWriteProcessor API (early execution of NativeRDD.ShuffleWrite iterator)
// Adaptation for Spark 4.x: Defer NativeRDD.ShuffleWrite execution to ShuffleWriteProcessor.write() to align with Spark 3.x logic
if (SparkVersionUtil.isSparkV40OrGreater &&
computingNativePlan.getPhysicalPlanTypeCase == PhysicalPlanNode.PhysicalPlanTypeCase.SHUFFLE_WRITER) {
// SPARK-44605: Spark 4+ refines ShuffleWriteProcessor API (early execution of native
// shuffle-writer iterators). Adaptation for Spark 4.x: defer both native shuffle-writer
// plan types (SHUFFLE_WRITER and RSS_SHUFFLE_WRITER) to ShuffleWriteProcessor.write() to
// align with Spark 3.x logic.
if (SparkVersionUtil.isSparkV40OrGreater && (computingNativePlan.getPhysicalPlanTypeCase == PhysicalPlanNode.PhysicalPlanTypeCase.SHUFFLE_WRITER
|| computingNativePlan.getPhysicalPlanTypeCase == PhysicalPlanNode.PhysicalPlanTypeCase.RSS_SHUFFLE_WRITER)) {
Iterator.empty
} else {
NativeHelper.executeNativePlan(computingNativePlan, metrics, split, Some(context))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ abstract class AuronRssShuffleWriterBase[K, V](metrics: ShuffleWriteMetricsRepor

def rssStop(success: Boolean): Option[MapStatus]

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def getPartitionLengths(): Array[Long] = rpw.getPartitionLengthMap

override def write(records: Iterator[Product2[K, V]]): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class AuronCelebornShuffleWriter[K, V](
celebornPartitionWriter
}

@sparkver("3.2 / 3.3 / 3.4 / 3.5")
@sparkver("3.2 / 3.3 / 3.4 / 3.5 / 4.0")
override def getPartitionLengths(): Array[Long] = {
celebornPartitionWriter.getPartitionLengthMap
}
Expand Down
Loading