apache/iceberg · error · UnsupportedOperationException
Unsupported type - map
Error message
Unsupported type - map
What it means
IcebergArrowColumnVector supports primitive and array (list) accessors but not map accessors, so getMap() unconditionally throws UnsupportedOperationException. Map-typed columns cannot be read through this Arrow-backed vector.
Source
Thrown at spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/IcebergArrowColumnVector.java:128
return accessor.getFloat(rowId);
}
@Override
public double getDouble(int rowId) {
return accessor.getDouble(rowId);
}
@Override
public ColumnarArray getArray(int rowId) {
if (isNullAt(rowId)) {
return null;
}
return accessor.getArray(rowId);
}
@Override
public ColumnarMap getMap(int rowId) {
throw new UnsupportedOperationException("Unsupported type - map");
}
@Override
public Decimal getDecimal(int rowId, int precision, int scale) {
if (isNullAt(rowId)) {
return null;
}
return accessor.getDecimal(rowId, precision, scale);
}
@Override
public UTF8String getUTF8String(int rowId) {
if (isNullAt(rowId)) {
return null;
}
return accessor.getUTF8String(rowId);
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Exclude the map column from the vectorized read (select only needed non-map columns)
- Disable vectorization: set table property read.split.vectorization.enabled=false for the read
- Use a non-vectorized/row-based reader (e.g. file-format-level parquet reader path)
- Upgrade Iceberg — map support in vectorized reads is extended in newer versions
Example fix
// before
spark.read.format("iceberg").load("t").select("m") // map column + vectorized
// after
spark.conf.set("read.split.vectorization.enabled", "false")
spark.read.format("iceberg").load("t").select("m") Defensive patterns
Strategy: validation
Validate before calling
boolean hasMap = table.schema().columns().stream().anyMatch(c -> c.type().typeId() == Types.MapType.class.cast(c.type()).typeId()); if (hasMap) { spark.conf.set("read.split.vectorization.enabled", "false"); } Try / catch
try { map = vector.getMap(rowId); } catch (UnsupportedOperationException e) { // retry read without vectorization }
spark.conf.set("read.split.vectorization.enabled", "false"); reRunQuery(); Prevention
- Exclude map columns from vectorized scans or disable vectorization for such tables
- Keep Iceberg updated for expanded vector type support
When it happens
Trigger: A vectorized batch scan selects a map-typed column, and Spark's columnar reader calls getMap(rowId) on the IcebergArrowColumnVector wrapping the map column.
Common situations: Querying tables containing Iceberg map columns with vectorized reads enabled (read.split.vectorization.enabled=true or Spark vectorized reader defaults for the format).
Related errors
- Unsupported type - map
- Unsupported type - map
- Unsupported type - byte
- Unsupported type - byte
- Unsupported type - short
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/a050afa617cd49ac.
Report an issue: GitHub.