apache/iceberg · error · UnsupportedOperationException

readFloats is not supported

Error message

readFloats is not supported

What it means

readFloats(total, vec, rowId) is the batch float read on VectorizedValuesReader; the default implementation throws UnsupportedOperationException because only float-capable concrete readers override it. Reaching it via nextVals() means the active reader does not support bulk float decoding into an Arrow FloatVector.

Source

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

   * @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) {
    throw new UnsupportedOperationException("readIntegers is not supported");
  }

  /** Read `total` longs into `vec` starting at `vec[rowId]` */
  default void readLongs(int total, FieldVector vec, int rowId) {
    throw new UnsupportedOperationException("readLongs is not supported");
  }

  /** Read `total` floats into `vec` starting at `vec[rowId]` */
  default void readFloats(int total, FieldVector vec, int rowId) {
    throw new UnsupportedOperationException("readFloats is not supported");
  }

  /** Read `total` doubles into `vec` starting at `vec[rowId]` */
  default void readDoubles(int total, FieldVector vec, int rowId) {
    throw new UnsupportedOperationException("readDoubles is not supported");
  }

  /**
   * Initialize the reader from a page. See {@link ValuesReader#initFromPage(int,
   * ByteBufferInputStream)}.
   */
  void initFromPage(int valueCount, ByteBufferInputStream in) throws IOException;
}

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Disable vectorized reads (read.arrow.enabled=false) for this workload.
  2. Upgrade Iceberg to a version implementing vectorized float batch reads.
  3. Implement readFloats() in the reader to fill vec[rowId..rowId+total).

Example fix

// before
// default readFloats throws
// after
@Override
public void readFloats(int total, FieldVector vec, int rowId) {
  for (int i = 0; i < total; i++) ((Float4Vector) vec).setSafe(rowId + i, readFloat());
}
Defensive patterns

Strategy: try-catch

Validate before calling

// check float support before enabling vectorization
if (schema.columns().stream().anyMatch(c -> c.type().equals(Types.FloatType.get())) && !floatsBatchSupported) {
  props.put("read.arrow.enabled", "false");
}

Try / catch

try {
  readVectorized();
} catch (UnsupportedOperationException e) {
  readNonVectorized();
}

Prevention

When it happens

Trigger: nextVals(total) tries to bulk-fill a float Arrow vector for a Parquet FLOAT column, and the selected reader subclass lacks a readFloats() override.

Common situations: Vectorized scans of float columns where only integer/long batch paths are implemented in the chosen reader; older Iceberg versions before float batch support; custom readers.

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/1c93001fb855dc52. Report an issue: GitHub.