akshaytayal commented on code in PR #13518:
URL: https://github.com/apache/gluten/pull/13518#discussion_r4648510594
##########
gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/validator/Validators.scala:
##########
@@ -165,6 +170,16 @@ object Validators {
}
}
+ private object FallbackByUnsupportedSparkFeatures extends Validator {
+ override def validate(plan: SparkPlan): Validator.OutCome = plan match {
+ // The scan reports `SinglePartition` and Spark may have elided a
shuffle above it, while the
+ // native scan doesn't coalesce its splits into a single task.
+ case p: FileSourceScanExec if
SparkShimLoader.getSparkShims.isSingleTaskExecutionScan(p) =>
Review Comment:
Fixed in 22de284, in the transformer as you suggested. When
`outputPartitioning` is `SinglePartition`, `VeloxLocalTableScanTransformer` now
parallelizes into one slice and returns one empty partition for empty input, as
`LocalTableScanExec` does, so the scan stays native. A new Spark 4.3 test in
`VeloxLocalTableScanSuite` runs a global aggregation over a 10-row relation and
over an empty one with single-task execution on. It checks the result and the
native scan, and that the plan has no shuffle.
Posted by an AI assistant. Flag anything wrong here.
--
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]