apache/iceberg · error · UnsupportedOperationException
Unsupported task group for columnar reads: ${partition.taskG
Error message
Unsupported task group for columnar reads: ${partition.taskGroup()} What it means
createColumnarReader requires that every task in the input partition is a plain FileScanTask. If the task group contains other task types (e.g. combined delete/equality-delete tasks not suited to columnar reads), columnar reading cannot proceed and the factory fails fast with the task group description.
Source
Thrown at spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkColumnarReaderFactory.java:62
@Override
public PartitionReader<InternalRow> createReader(InputPartition inputPartition) {
throw new UnsupportedOperationException("Row-based reads are not supported");
}
@Override
public PartitionReader<ColumnarBatch> createColumnarReader(InputPartition inputPartition) {
Preconditions.checkArgument(
inputPartition instanceof SparkInputPartition,
"Unknown input partition type: %s",
inputPartition.getClass().getName());
SparkInputPartition partition = (SparkInputPartition) inputPartition;
if (partition.allTasksOfType(FileScanTask.class)) {
return new BatchDataReader(partition, parquetConf, orcConf);
} else {
throw new UnsupportedOperationException(
"Unsupported task group for columnar reads: " + partition.taskGroup());
}
}
@Override
public boolean supportColumnarReads(InputPartition inputPartition) {
return true;
}
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Fall back to row-based reads for these partitions or disable vectorized reads (spark.sql.iceberg.vectorized-reader.enabled=false).
- Rewrite the table (e.g. rewrite_data_files / rewrite deletes) to remove equality deletes so all tasks are FileScanTasks.
- Check the task group in the message to identify which scan produced the unsupported tasks.
Example fix
// before
spark.conf.set("spark.sql.iceberg.vectorized-reader.enabled", "true") // fails on equality deletes
// after
spark.conf.set("spark.sql.iceberg.vectorized-reader.enabled", "false") Defensive patterns
Strategy: validation
Validate before calling
// check for equality deletes before columnar read
boolean hasEqDeletes = table.currentSnapshot() != null &&
!table.currentSnapshot().dataManifests(table.io()).stream()
.flatMap(m -> safe(m::deleteFilesCount).stream()) ... ; // or simply check spec/format Type guard
if (!partition.allTasksOfType(FileScanTask.class)) { /* fall back to row reader */ } Try / catch
try { reader = factory.createColumnarReader(p); } catch (UnsupportedOperationException e) { reader = rowReaderFor(p); } Prevention
- Rewrite tables to eliminate equality deletes before vectorized scans
- Disable vectorized reader on tables with merge-on-read equality deletes
- Monitor the task-group message to find scans emitting non-file tasks
When it happens
Trigger: Calling createColumnarReader on a SparkInputPartition whose taskGroup contains non-FileScanTask tasks, i.e. partition.allTasksOfType(FileScanTask.class) is false.
Common situations: Tables with equality deletes or mixed task types where Spark requests columnar reads (vectorized reader enabled); also custom scans producing non-file tasks.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Row-based reads are not supported
- Columnar reads are not supported
- Columnar reads are not supported
- Columnar reads are not supported
- ${getClass().getName()} does not support forEach
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/c0fa55937d1764d5.
Report an issue: GitHub.