apache/iceberg · error · IndexOutOfBoundsException
Child columns is null hence cannot find index:
Error message
Child columns is null hence cannot find index:
What it means
childColumn(pos) indexes into the accessor's child column vectors (the element vectors of a list or fields of a struct). It throws IndexOutOfBoundsException when childColumns is null, meaning this accessor was created without nested child vectors — the column is not nested, so there is no child vector to look up.
Solutions
- Check childColumn availability (non-null childColumns / list-typed column) before calling
- Verify the vectorized reader was built with nested-type support so child columns are populated
- Fall back to the non-vectorized read path for nested columns when children are absent
Example fix
// before
ChildVectorT child = accessor.childColumn(0); // throws if childColumns == null
// after
if (accessor.getChildColumns() != null && accessor.getChildColumns().length > 0) {
ChildVectorT child = accessor.childColumn(0);
} Defensive patterns
Strategy: validation
Validate before calling
if (accessor.getChildColumns() == null) { throw new IllegalStateException("accessor has no child columns"); } Try / catch
try { return accessor.childColumn(pos); } catch (IndexOutOfBoundsException e) { /* recreate accessor with nested support or fall back */ } Prevention
- Confirm child columns exist before element-wise access
- Ensure the reader is constructed with nested-type support so childColumns are populated
- Wrap accessor construction and usage together so configuration mismatches surface early
When it happens
Trigger: Calling childColumn(pos) on an accessor constructed without child columns (non-list/non-struct column), or after a factory path that returns null children for unsupported nested types.
Common situations: Assuming list support in vectorized reads and calling childColumn on primitive accessors; vectorized readers built with childColumns omitted (e.g. nested types disabled) while downstream code still requests children.
Related errors
- Struct type is not supported
- Unsupported type: array
- Cannot convert dict encoded field
- Cannot convert nested accessor to position
- Cannot read files that require applying delete files
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/0b32700f8676f62b.
Report an issue: GitHub.
Appendix: source
Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java:92
}
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");
}
public ArrayT getArray(int rowId) {
throw new UnsupportedOperationException("Unsupported type: array");
}
public ChildVectorT childColumn(int pos) {
if (childColumns != null) {
return childColumns[pos];
} else {
throw new IndexOutOfBoundsException("Child columns is null hence cannot find index: " + pos);
}
}
public final ValueVector getVector() {
return vector;
}
}
View on GitHub (pinned to 86d9c8fc54)