felixloesing commented on code in PR #13776:
URL: https://github.com/apache/gluten/pull/13776#discussion_r4758605928
##########
gluten-iceberg/src/main/scala/org/apache/iceberg/spark/source/GlutenIcebergSourceUtil.scala:
##########
@@ -268,7 +275,13 @@ object GlutenIcebergSourceUtil {
}
def getReadPartitionSchema(sparkScan: Scan): StructType = {
- asFileScanTask(getScanTasks(sparkScan).toList).foreach {
+ val tasks = asFileScanTask(getScanTasks(sparkScan).toList)
+ // No splits are generated, so this schema never lays out any output rows.
+ if (tasks.isEmpty) {
+ return new StructType()
+ }
Review Comment:
Kept the throw, because the function needs a value after the loop and
removing it would mean restructuring it.
--
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]