apache/iceberg · error · UnsupportedOperationException
Not an integer column
Error message
Not an integer column
What it means
TripleWriter's writeInteger default implementation throws UnsupportedOperationException because the method only exists to be overridden by writers for INT32 Parquet columns. Calling it on a writer bound to a column of a different physical type hits the default throwing body. It is a compile-time-dispatchable but runtime-enforced type check for column writers.
Source
Thrown at parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java:51
/**
* Write a triple.
*
* @param rl repetition level
* @param value the boolean value
*/
default void writeBoolean(int rl, boolean value) {
throw new UnsupportedOperationException("Not a boolean column");
}
/**
* Write a triple.
*
* @param rl repetition level
* @param value the integer value
*/
default void writeInteger(int rl, int value) {
throw new UnsupportedOperationException("Not an integer column");
}
/**
* 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
*/View on GitHub (pinned to 86d9c8fc54)
Solutions
- Confirm the column's physical type is INT32 before calling writeInteger.
- Override writeInteger in custom TripleWriter implementations for INT32 columns.
- Regenerate/rebuild the appender-writer chain after any Iceberg schema type change.
Example fix
// before writer.writeInteger(rl, value); // column is INT64 // after writer.writeLong(rl, value); // use the method matching the column's physical type
Defensive patterns
Strategy: type-guard
Validate before calling
boolean isInt32Column(ColumnDescriptor col) {
return col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.INT32;
} Type guard
if (col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.INT32) { writer.writeInteger(rl, value); } Prevention
- Match writeX calls to the column's PrimitiveTypeName (INT32 -> writeInteger).
- Regenerate writers whenever the Iceberg schema changes a field's type.
- Cover each physical type in writer tests.
When it happens
Trigger: Calling column.writeInteger(rl, value) on a TripleWriter whose Parquet column is not INT32 (e.g. INT64, FLOAT, BOOLEAN).
Common situations: Writing Iceberg int values through a writer constructed for a differently-typed column; custom writer subclasses that did not override writeInteger; schema drift after changing a column from int to long without regenerating writers.
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/cf17d0c480003888.
Report an issue: GitHub.