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

  1. Ensure int columns get an accessor subclass that overrides getInt (e.g. an IntVector-backed accessor).
  2. Override getInt in your subclass if you extend ArrowVectorAccessor.
  3. 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

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


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