apache/iceberg · error · UnsupportedOperationException

readFloat is not supported

Error message

readFloat is not supported

What it means

This default method in VectorizedValuesReader is a placeholder that throws UnsupportedOperationException; concrete reader implementations override it only when they support single float reads. Reaching it means nextVal() dispatched a FLOAT column to a reader class that never implemented readFloat(). The throw is by design to fail fast on unimplemented type paths rather than silently return garbage.

Source

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

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

  /**
   * Read binary data of some length
   *
   * @param len The number of bytes to read
   */
  default Binary readBinary(int len) {
    throw new UnsupportedOperationException("readBinary is not supported");
  }

  /** Read `total` integers into `vec` starting at `vec[rowId]` */
  default void readIntegers(int total, FieldVector vec, int rowId) {

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Disable vectorized reads (e.g. read.arrow.enabled=false) to use the non-vectorized Parquet reader for this query.
  2. Upgrade Iceberg to a version with vectorized float support for your Parquet encoding.
  3. If you wrote the reader class, implement readFloat() for the underlying page buffer.

Example fix

// before
// reader inherits default readFloat() which throws
// after
@Override
public float readFloat() { return buffer.getFloat(offset); }
Defensive patterns

Strategy: fallback

Validate before calling

// check schema before enabling vectorized reads
boolean floatCols = schema.columns().stream().anyMatch(c -> c.type().equals(Types.FloatType.get()));
if (floatCols && !vectorizedFloatSupported) props.put("read.arrow.enabled", "false");

Prevention

When it happens

Trigger: VectorizedPageReader.nextVal() calls readFloat() for a Parquet FLOAT column, but the active VectorizedValuesReader subclass (e.g. a default/fallback reader) does not override readFloat().

Common situations: Reading float columns with vectorized/Arrow reads enabled in a configuration where the reader factory falls back to the base reader; custom reader implementations missing the float override; Iceberg versions without vectorized float support for the relevant encoding.

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/15553542265f7134. Report an issue: GitHub.