apache/iceberg · error · UnsupportedOperationException
Unsupported type: float
Error message
Unsupported type: float
What it means
The base ArrowVectorAccessor.getFloat(int) is an unimplemented stub that always throws. Float (float4) vector accessors must override it; invoking the base means the accessor for this vector does not support float extraction. toFloat4Vector in the vectorized readers depends on an overriding subclass.
Source
Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java:65
}
}
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");
}
public DecimalT getDecimal(int rowId, int precision, int scale) {
throw new UnsupportedOperationException("Unsupported type: decimal");
}
public Utf8StringT getUTF8String(int rowId) {
throw new UnsupportedOperationException("Unsupported type: UTF8String");
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Use a Float4-backed accessor subclass that overrides getFloat to return vector.get(rowId).
- Override getFloat in your subclass.
- Verify the accessor factory dispatches Float4Vector to the float accessor.
Example fix
// before
class MyAccessor extends ArrowVectorAccessor<Float4Vector> { } // getFloat missing
// after
@Override public float getFloat(int rowId) { return vector.get(rowId); } Defensive patterns
Strategy: type-guard
Validate before calling
if (!(accessor instanceof FloatAccessor)) { /* fallback */ } Type guard
static boolean supportsFloat(ArrowVectorAccessor<?> a) {
return a.getClass() != ArrowVectorAccessor.class;
} Try / catch
try {
float v = accessor.getFloat(rowId);
} catch (UnsupportedOperationException e) {
if ("Unsupported type: float".equals(e.getMessage())) { fallbackRead(rowId); } else { throw e; }
} Prevention
- Map Float4Vector fields to float-capable accessors.
- Override getFloat in subclasses.
- Add float coverage to the accessor factory tests.
When it happens
Trigger: Reading a float column through a non-float accessor or the raw base class; factory code that maps float vectors to a generic accessor.
Common situations: Custom readers converting Arrow batches to engine vectors (toFloat4Vector path) with a mis-mapped accessor; subclass written without the float override.
Related errors
- Cannot read unsupported column types:
- Unsupported type: boolean
- Unsupported type: int
- Unsupported type: long
- Unsupported type: double
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/e5b3504eac6c7f12.
Report an issue: GitHub.