apache/iceberg · error · UnsupportedOperationException

Unsupported type: boolean

Error message

Unsupported type: boolean

What it means

ArrowVectorAccessor is an abstract base whose getBoolean(int) is a default stub that always throws UnsupportedOperationException. A concrete subclass was expected to override it for boolean-backed vectors, but the base implementation was invoked, meaning no accessor was registered for boolean columns.

Source

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

  }

  @Override
  public void close() {
    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");
  }

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Use the accessor factory for the vector's actual Arrow type so a boolean-capable accessor subclass is created.
  2. Override getBoolean in your concrete accessor subclass if you are extending ArrowVectorAccessor.
  3. If boolean columns hit this via the vectorized reader, disable vectorized reads for that scan or upgrade Iceberg to a version with full boolean support.

Example fix

// before (subclass missing override)
class MyAccessor extends ArrowVectorAccessor { }
// after
class MyAccessor extends ArrowVectorAccessor<BoolVector> {
  @Override public boolean getBoolean(int rowId) { return vector.get(rowId); }
}
Defensive patterns

Strategy: type-guard

Validate before calling

if (!(accessor instanceof BooleanAccessor)) {
  // accessor cannot read booleans; use fallback path
}

Type guard

static boolean supportsBoolean(ArrowVectorAccessor<?> a) {
  return !(a.getClass() == ArrowVectorAccessor.class);
}

Try / catch

try {
  boolean v = accessor.getBoolean(rowId);
} catch (UnsupportedOperationException e) {
  if ("Unsupported type: boolean".equals(e.getMessage())) {
    fallbackRead(rowId);
  } else { throw e; }
}

Prevention

When it happens

Trigger: Calling getBoolean on an ArrowVectorAccessor instance whose concrete class does not override getBoolean — e.g. a generic/passthrough accessor created for a column type without a dedicated accessor subclass.

Common situations: Custom vectorized-read extensions that build accessors generically without wiring every primitive type; new Iceberg/Arrow type mappings added without updating accessor factory; direct use of the base class in tests or custom code.

Related errors


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