apache/iceberg · error · UnsupportedOperationException

Not an float column

Error message

Not an float column

What it means

TripleWriter.writeFloat's default implementation throws 'Not an float column'. It exists so only FLOAT-typed Parquet column writers override it; any other writer retains the throwing default and fails when writeFloat is invoked.

Source

Thrown at parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java:71

  /**
   * Write a triple.
   *
   * @param rl repetition level
   * @param value the long value
   */
  default void writeLong(int rl, long value) {
    throw new UnsupportedOperationException("Not an long column");
  }

  /**
   * Write a triple.
   *
   * @param rl repetition level
   * @param value the float value
   */
  default void writeFloat(int rl, float value) {
    throw new UnsupportedOperationException("Not an float column");
  }

  /**
   * Write a triple.
   *
   * @param rl repetition level
   * @param value the double value
   */
  default void writeDouble(int rl, double value) {
    throw new UnsupportedOperationException("Not an double column");
  }

  /**
   * Write a triple.
   *
   * @param rl repetition level
   * @param value the binary value
   */

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Confirm the column's physical type is FLOAT before calling writeFloat; use writeDouble for DOUBLE columns.
  2. Override writeFloat in custom TripleWriter implementations for FLOAT columns.
  3. Reconcile the Iceberg schema (float vs double) with the Parquet schema so writer dispatch matches.

Example fix

// before
writer.writeFloat(rl, value); // column is DOUBLE
// after
writer.writeDouble(rl, (double) value);
Defensive patterns

Strategy: type-guard

Validate before calling

boolean isFloatColumn(ColumnDescriptor col) {
  return col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.FLOAT;
}

Type guard

if (col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.FLOAT) { writer.writeFloat(rl, value); }

Prevention

When it happens

Trigger: Calling column.writeFloat(rl, value) on a TripleWriter whose Parquet column is not FLOAT (e.g. DOUBLE, INT32).

Common situations: Writing Iceberg float values into a double column writer (or vice versa); custom writers missing the override; confusion between Java float/double and Parquet FLOAT/DOUBLE types.

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/2435bfe1d4c77209. Report an issue: GitHub.