diff --git a/gluten-substrait/src/main/scala/org/apache/gluten/execution/WholeStageTransformer.scala b/gluten-substrait/src/main/scala/org/apache/gluten/execution/WholeStageTransformer.scala index dbfc11c136db..a752f33ef649 100644 --- a/gluten-substrait/src/main/scala/org/apache/gluten/execution/WholeStageTransformer.scala +++ b/gluten-substrait/src/main/scala/org/apache/gluten/execution/WholeStageTransformer.scala @@ -373,7 +373,7 @@ case class WholeStageTransformer(child: SparkPlan, materializeInput: Boolean = f * care of SCAN there won't be any other RDD for SCAN. As a result, genFirstStageIterator * rather than genFinalStageIterator will be invoked */ - val allScanPartitions = basicScanExecTransformers.map(_.getPartitions) + val allScanPartitions = basicScanExecTransformers.map(_.getPartitions.toIndexedSeq) val allScanSplitInfos = getSplitInfosFromPartitions(basicScanExecTransformers, allScanPartitions) if (GlutenConfig.getConf.enableHdfsViewfs) {