apache/iceberg · error · UnsupportedOperationException
readIntegers is not supported
Error message
readIntegers is not supported
What it means
readIntegers(total, vec, rowId) is a batch-read default method on VectorizedValuesReader that throws UnsupportedOperationException. Concrete vectorized readers override it to bulk-decode integers directly into an Arrow IntVector. Reaching the default means nextVals() batch dispatch selected a reader class that never implemented the integer batch path.
Source
Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedValuesReader.java:85
}
/** Read a single double */
default double readDouble() {
throw new UnsupportedOperationException("readDouble is not supported");
}
/**
* Read binary data of some length
*
* @param len The number of bytes to read
*/
default Binary readBinary(int len) {
throw new UnsupportedOperationException("readBinary is not supported");
}
/** Read `total` integers into `vec` starting at `vec[rowId]` */
default void readIntegers(int total, FieldVector vec, int rowId) {
throw new UnsupportedOperationException("readIntegers is not supported");
}
/** Read `total` longs into `vec` starting at `vec[rowId]` */
default void readLongs(int total, FieldVector vec, int rowId) {
throw new UnsupportedOperationException("readLongs is not supported");
}
/** Read `total` floats into `vec` starting at `vec[rowId]` */
default void readFloats(int total, FieldVector vec, int rowId) {
throw new UnsupportedOperationException("readFloats is not supported");
}
/** Read `total` doubles into `vec` starting at `vec[rowId]` */
default void readDoubles(int total, FieldVector vec, int rowId) {
throw new UnsupportedOperationException("readDoubles is not supported");
}
/**View on GitHub (pinned to 86d9c8fc54)
Solutions
- Disable vectorized reads (read.arrow.enabled=false) to avoid the batch vectorized path.
- Upgrade Iceberg for vectorized batch support for this type/encoding.
- Implement readIntegers() in the concrete reader, filling vec[rowId..rowId+total).
Example fix
// before
// default readIntegers throws
// after
@Override
public void readIntegers(int total, FieldVector vec, int rowId) {
for (int i = 0; i < total; i++) ((IntVector) vec).setSafe(rowId + i, readInteger());
} Defensive patterns
Strategy: try-catch
Validate before calling
// precheck column type before batch vectorized scan
boolean isInt = columnType.equals(Types.IntegerType.get());
if (!isInt) throw new IllegalStateException("batch int read requested for non-int column"); Try / catch
try {
scan = table.newScan().includeColumnStats();
tasks = Tasks.foreach(tasks)
} catch (UnsupportedOperationException e) {
// fall back: rerun with read.arrow.enabled=false
props.put("read.arrow.enabled", "false");
} Prevention
- Only use batch vectorized reads for INT columns with a reader that overrides readIntegers.
- Keep custom VectorizedValuesReader implementations in sync with all dispatch sites.
- Test with the exact Parquet encodings your writers produce.
When it happens
Trigger: VectorizedPageReader.nextVals(total) calls readIntegers(total, vec, rowId) to fill an Arrow integer vector in bulk, but the active reader subclass does not override the batch integer method (e.g. it only implements per-value reads).
Common situations: Scanning INT columns with vectorized reads enabled where the reader falls back to a base implementation; dictionary-encoded or delta-encoded pages whose reader omits the batch path; custom or older reader implementations.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- readLongs is not supported
- readFloats is not supported
- readDoubles is not supported
- readLong is not supported
- readFloat is not supported
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/5b8bc4fc6afecce4.
Report an issue: GitHub.