apache/iceberg · error · UnsupportedOperationException

Unsupported type: array

Error message

Unsupported type: array

What it means

ArrowVectorAccessor.getArray is a base-class stub that always throws UnsupportedOperationException. List/array columns require an accessor subclass that overrides getArray and childColumn; the base class cannot decode nested elements, so any call that falls through to it indicates the column is not an array or the accessor lacks array support.

Source

Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessor.java:85

  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");
  }

  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)

Solutions

  1. Confirm the column's Iceberg type is List before calling getArray
  2. Ensure the vectorized reader path supports nested types, or fall back to the non-vectorized row reader for list columns
  3. Use childColumn/element accessors from a list-supporting accessor subclass rather than the base class
Defensive patterns

Strategy: type-guard

Validate before calling

if (!(columnType instanceof Types.NestedType) || columnType.typeId() != TypeID.LIST) { throw new IllegalArgumentException("not a list column"); }

Type guard

boolean isArrayAccessor(ArrowVectorAccessor<?,?,?,?> a) { return a instanceof ListArrowAccessor; }

Try / catch

try { return accessor.getArray(rowId); } catch (UnsupportedOperationException e) { return null; } // caller falls back to row reader

Prevention

When it happens

Trigger: Calling getArray(rowId) on a non-list accessor while materializing a vectorized batch; attempting nested-element access through an accessor created for a primitive column.

Common situations: Vectorized Iceberg reads with nested (list) columns where the configured batch reader does not produce list accessors; code that generically walks all columns calling typed getters without switching on column type.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/3e578395b9cd4aeb. Report an issue: GitHub.