apache/iceberg · error · UnsupportedOperationException
Cannot support vectorized reads for column " + desc + "…
Error message
Cannot support vectorized reads for column " + desc + " with encoding " + dataEncoding + ". Disable vectorized reads to read this table/file
What it means
The vectorized Parquet reader only implements vectorized decoding for a fixed set of encodings (PLAIN, dictionary-based, DELTA_BYTE_ARRAY, BYTE_STREAM_SPLIT, etc.). If a data page uses any other encoding, initDataReader throws UnsupportedOperationException and tells the user to disable vectorized reads. It is a capability limitation, not data corruption.
Solutions
- Disable vectorized reads for the scan/table (Spark: SET spark.sql.iceberg.vectorization.enabled=false; or table property read.split.vectorization.enabled=false).
- Rewrite the data files with encodings the vectorized reader supports (e.g. via Iceberg rewrite_data_files after adjusting parquet writer settings).
- Upgrade Iceberg — newer versions add vectorized support for more encodings (e.g. DELTA_BINARY_PACKED).
Example fix
// before SELECT ... FROM tbl -- vectorized read hits unsupported encoding // after SET spark.sql.iceberg.vectorization.enabled=false; SELECT ... FROM tbl
Defensive patterns
Strategy: fallback
Validate before calling
// Inspect file encodings before enabling vectorized reads // parquet-tools meta file.parquet -> check encodings per column // If DELTA_BINARY_PACKED or other unsupported encodings are present, disable vectorization
Try / catch
try {
// vectorized read
} catch (UnsupportedOperationException e) {
if (e.getMessage().contains("Cannot support vectorized reads")) {
// retry the read with vectorization disabled
} else throw e;
} Prevention
- Check file encodings (parquet-tools / metadata) before enabling vectorized reads
- Set spark.sql.iceberg.vectorization.enabled=false for tables written by engines using unsupported encodings
- Rewrite files with vectorized-supported encodings; upgrade Iceberg for newer encoding support
When it happens
Trigger: initDataReader's encoding switch hits the default branch — e.g. pages encoded with DELTA_BINARY_PACKED, RLE on non-boolean data, or other unsupported encodings read via the vectorized path.
Common situations: Files written by other engines/writers (e.g. delta-binary-packed integer columns from Spark/Parquet-mr defaults) read through Iceberg's vectorized reader.
Related errors
- Buffer size of is larger than requested size of
- Byte stream split encoding is not supported for type " +…
- doesn't implement setRowGroupInfo(PageReadStore…
- Failed to read from input stream
- Non-supported bytesWidth: " + bytesWidth
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/354caac0d5749d1b.
Report an issue: GitHub.
Appendix: source
Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedPageIterator.java:116
case PLAIN:
valuesReader = new VectorizedPlainValuesReader();
break;
case DELTA_BINARY_PACKED:
valuesReader = new VectorizedDeltaEncodedValuesReader();
break;
case DELTA_LENGTH_BYTE_ARRAY:
valuesReader = new VectorizedDeltaLengthByteArrayValuesReader();
break;
case DELTA_BYTE_ARRAY:
valuesReader = new VectorizedDeltaByteArrayValuesReader();
break;
case BYTE_STREAM_SPLIT:
valuesReader =
new VectorizedByteStreamSplitValuesReader(
byteStreamSplitElementSize(desc.getPrimitiveType()));
break;
default:
throw new UnsupportedOperationException(
"Cannot support vectorized reads for column "
+ desc
+ " with "
+ "encoding "
+ dataEncoding
+ ". Disable vectorized reads to read this table/file");
}
try {
valuesReader.initFromPage(valueCount, in);
} catch (IOException e) {
throw new ParquetDecodingException(
"could not read page " + valueCount + " in col " + desc, e);
}
dictionaryDecodeMode = DictionaryDecodeMode.NONE;
}
if (CorruptDeltaByteArrays.requiresSequentialReads(writerVersion, dataEncoding)
&& previousReader instanceof RequiresPreviousReader) {
// previous reader can only be set if reading sequentiallyView on GitHub (pinned to 86d9c8fc54)