apache/iceberg · error · UnsupportedOperationException
Not an long column
Error message
Not an long column
What it means
TripleWriter.writeLong's default body throws UnsupportedOperationException with a (typo'd) message 'Not an long column'. Only writers for INT64 Parquet columns override it; all other column writers keep the throwing default, so calling writeLong on a non-INT64 writer fails at runtime.
Source
Thrown at parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java:61
/**
* 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
*/
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
*/View on GitHub (pinned to 86d9c8fc54)
Solutions
- Verify the Parquet column physical type is INT64 before calling writeLong.
- Override writeLong in custom TripleWriter implementations for INT64 columns.
- Check the type mapping produced by TypeToMessageType for the field (timestamps must map to INT64 with a logical annotation).
Example fix
// before writer.writeLong(rl, value); // column is INT32 // after writer.writeInteger(rl, (int) value); // or fix the schema so the column is INT64
Defensive patterns
Strategy: type-guard
Validate before calling
boolean isInt64Column(ColumnDescriptor col) {
return col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.INT64;
} Type guard
if (col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.INT64) { writer.writeLong(rl, value); } Prevention
- Use writeLong only for INT64 columns (long, timestamp, timestamptz fields).
- Verify type mapping after int->long schema evolution.
- Assert expected physical types when constructing writers.
When it happens
Trigger: Calling column.writeLong(rl, value) on a TripleWriter whose Parquet column is not INT64 (e.g. INT32, DOUBLE, BINARY).
Common situations: Writing Iceberg long or timestamp values through a writer for an int column; custom TripleWriter subclasses missing the writeLong override; schema evolution (int->long) not mirrored in 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/abd8d6cc37d670e1.
Report an issue: GitHub.