apache/iceberg · error · UnsupportedOperationException
Unsupported type: int
Error message
Unsupported type: int
What it means
The base ArrowVectorAccessor.getInt(int) is an unimplemented stub that always throws. It is only meant as a default; concrete accessors for integer-backed Arrow vectors must override it. Hitting it means the accessor instance lacks integer support.
Source
Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java:57
if (childColumns != null) {
for (ChildVectorT column : childColumns) {
try {
// Closing an ArrowColumnVector is expected to not throw any exception
column.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
vector.close();
}
public boolean getBoolean(int rowId) {
throw new UnsupportedOperationException("Unsupported type: boolean");
}
public int getInt(int rowId) {
throw new UnsupportedOperationException("Unsupported type: int");
}
public long getLong(int rowId) {
throw new UnsupportedOperationException("Unsupported type: long");
}
public float getFloat(int rowId) {
throw new UnsupportedOperationException("Unsupported type: float");
}
public double getDouble(int rowId) {
throw new UnsupportedOperationException("Unsupported type: double");
}
public byte[] getBinary(int rowId) {
throw new UnsupportedOperationException("Unsupported type: binary");
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Ensure int columns get an accessor subclass that overrides getInt (e.g. an IntVector-backed accessor).
- Override getInt in your subclass if you extend ArrowVectorAccessor.
- Fall back to the non-vectorized reader if the vectorized path cannot supply a proper accessor.
Example fix
// before
ArrowVectorAccessor acc = new ArrowVectorAccessor<>(vector); // base stubs
// after
IntAccessor acc = new IntAccessor(vector); // overrides getInt
// @Override public int getInt(int rowId) { return vector.get(rowId); } Defensive patterns
Strategy: type-guard
Validate before calling
if (!(accessor instanceof IntAccessor)) { /* fallback to row reader */ } Type guard
static boolean supportsInt(ArrowVectorAccessor<?> a) {
return a.getClass() != ArrowVectorAccessor.class;
} Try / catch
try {
int v = accessor.getInt(rowId);
} catch (UnsupportedOperationException e) {
if ("Unsupported type: int".equals(e.getMessage())) { fallbackRead(rowId); } else { throw e; }
} Prevention
- Route IntVector fields to int-capable accessor subclasses.
- Override getInt in any custom accessor subclass.
- Test the accessor factory for every supported Arrow type.
When it happens
Trigger: Calling getInt on an accessor whose concrete subclass (or a generic accessor) does not implement int extraction — e.g. reading an int column through an accessor created for a different vector type.
Common situations: Custom engines building accessors by hand; new type mappings not routed to the correct subclass; reflection-based or test code instantiating ArrowVectorAccessor directly.
Related errors
- Cannot read unsupported column types:
- Unsupported type: boolean
- Unsupported type: long
- Unsupported type: float
- Unsupported type: double
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/cefdcd26d29ee5a2.
Report an issue: GitHub.