apache/iceberg · error · UnsupportedOperationException

readInteger is not supported

Error message

readInteger is not supported

What it means

VectorizedValuesReader.readInteger is a default interface method that throws UnsupportedOperationException. Integer reads must be provided by the concrete values reader; calling it on an implementation that does not override it (e.g. one designed only for dictionary-id lookup or specific types) fails.

Solutions

  1. Ensure the column's reader is a stream-backed implementation overriding readInteger.
  2. For dictionary-encoded columns use the dictionary read methods (readIntegerDictionaryId / nextDictEncodedVal) instead of the plain path.
  3. Override readInteger in custom VectorizedValuesReader implementations.

Example fix

// before
int v = valuesReader.readInteger(); // throws on dictionary-id reader
// after
int v = isDictEncoded ? valuesReader.readIntegerDictionaryId() : valuesReader.readInteger();
Defensive patterns

Strategy: validation

Validate before calling

// ensure the reader supports plain INT32 reads before calling
boolean isDictOnly = valuesReader instanceof VectorizedDictionaryEncodedParquetValuesReader;
if (isDictOnly && !dictEncodedPage) { disableVectorization = true; }

Try / catch

try {
  int len = valuesReader.readInteger();
} catch (UnsupportedOperationException e) {
  // reader does not support plain integer reads — switch path
  decodeDictionaryEncoded();
}

Prevention

When it happens

Trigger: Calling readInteger() from a nextVal or len path on a VectorizedValuesReader that does not implement it — e.g. reading an INT32 value or a binary length prefix through a reader that never overrode readInteger.

Common situations: Vectorized decoding of INT32 columns (including string/binary length prefixes) when the active reader implementation only supports other types (e.g. dictionary lookup readers); custom reader subclasses.

Related errors


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

Appendix: source

Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedValuesReader.java:56

  /** Read a single boolean */
  default boolean readBoolean() {
    throw new UnsupportedOperationException("readBoolean is not supported");
  }

  /** Read a single byte */
  default byte readByte() {
    throw new UnsupportedOperationException("readByte is not supported");
  }

  /** Read a single short */
  default short readShort() {
    throw new UnsupportedOperationException("readShort is not supported");
  }

  /** Read a single integer */
  default int readInteger() {
    throw new UnsupportedOperationException("readInteger is not supported");
  }

  /** Read a single long */
  default long readLong() {
    throw new UnsupportedOperationException("readLong is not supported");
  }

  /** Read a single float */
  default float readFloat() {
    throw new UnsupportedOperationException("readFloat is not supported");
  }

  /** Read a single double */
  default double readDouble() {
    throw new UnsupportedOperationException("readDouble is not supported");
  }

  /**

View on GitHub (pinned to 86d9c8fc54)