apache/iceberg · error · UnsupportedOperationException
${className} doesn't implement setRowGroupInfo(PageReadStore
Error message
${className} doesn't implement setRowGroupInfo(PageReadStore, Map<ColumnPath, ColumnChunkMetaData>) What it means
VectorizedReader's default setRowGroupInfo implementation throws UnsupportedOperationException because vectorized reading requires concrete readers to consume row-group page and column-chunk metadata. The base interface only declares the contract; readers that are not vectorization-aware (or that forgot to override the default) cannot be driven by the batch/vectorized scan pipeline. It indicates a reader class was plugged into a vectorized read path without implementing the required row-group setup.
Source
Thrown at parquet/src/main/java/org/apache/iceberg/parquet/VectorizedReader.java:47
/**
* Reads a batch of type @param <T> and of size numRows
*
* @param reuse container for the last batch to be reused for next batch
* @param numRows number of rows to read
* @return batch of records of type @param <T>
*/
T read(T reuse, int numRows);
void setBatchSize(int batchSize);
/**
* Sets the row group information to be used with this reader
*
* @param pages row group information for all the columns
* @param metadata map of {@link ColumnPath} -> {@link ColumnChunkMetaData} for the row group
*/
default void setRowGroupInfo(PageReadStore pages, Map<ColumnPath, ColumnChunkMetaData> metadata) {
throw new UnsupportedOperationException(
this.getClass().getName()
+ " doesn't implement setRowGroupInfo(PageReadStore, Map<ColumnPath, ColumnChunkMetaData>)");
}
/** Release any resources allocated. */
void close();
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Override setRowGroupInfo in your VectorizedReader subclass to store PageReadStore and ColumnChunkMetaData for the row group
- Use a built-in vectorized reader (e.g. VectorizedTableScanIterable readers) instead of a custom reader for vectorized scans
- Disable vectorized reads so the non-vectorized reader path is used
- Check that all columns in the projection are supported by the vectorized reader implementation
Example fix
// before
class MyReader implements VectorizedReader<ColumnarBatch> {
// setRowGroupInfo not overridden -> UnsupportedOperationException at runtime
}
// after
class MyReader implements VectorizedReader<ColumnarBatch> {
@Override
public void setRowGroupInfo(PageReadStore pages, Map<ColumnPath, ColumnChunkMetaData> metadata) {
this.pages = pages;
this.metadata = metadata;
}
} Defensive patterns
Strategy: try-catch
Validate before calling
if (!supportsSetRowGroupInfo(reader.getClass())) {
throw new IllegalArgumentException(reader.getClass() + " is not a vectorized reader");
} Type guard
static boolean isVectorized(org.apache.iceberg.parquet.VectorizedReader<?> r) {
try {
java.lang.reflect.Method m = r.getClass().getDeclaredMethod("setRowGroupInfo",
org.apache.parquet.column.page.PageReadStore.class, java.util.Map.class);
return !m.getDeclaringClass().equals(org.apache.iceberg.parquet.VectorizedReader.class);
} catch (NoSuchMethodException e) { return false; }
} Try / catch
try {
reader.setRowGroupInfo(pages, metadata);
} catch (UnsupportedOperationException e) {
LOG.warn("Reader {} is not vectorized; falling back to non-vectorized read", reader.getClass());
throw e;
} Prevention
- Always override setRowGroupInfo when implementing VectorizedReader
- Add an abstract base class test asserting row-group setup works before using custom readers
- Keep custom readers aligned with the VectorizedReader interface of your Iceberg version
- Prefer built-in vectorized readers unless the type genuinely needs custom batch handling
When it happens
Trigger: Calling setRowGroupInfo on a VectorizedReader subclass that does not override the default method — e.g. a custom reader passed to a vectorized Spark scan, or a reader whose batched read path was enabled without implementing setRowGroupInfo(PageReadStore, Map<ColumnPath, ColumnChunkMetaData>).
Common situations: Custom VectorizedReader implementations used with vectorized-enabled reads (spark.sql.iceberg.handle-timestamp-without-timezone / vectorized reads enabled), version upgrades where the interface gained the metadata parameter, or accidentally using a generic reader where a vectorized one is required.
Related errors
- skip is not supported
- skip is not supported
- Unsupported variant: shredded typed_value array
- Non-supported bytesWidth: " + bytesWidth
- not a valid mode " + this.mode
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/cbff95343d2736a8.
Report an issue: GitHub.