apache/iceberg · error · java.lang.UnsupportedOperationException
Unsupported type: %s
Error message
Unsupported type: %s
What it means
FlinkParquetReaders.primitive() throws UnsupportedOperationException 'Unsupported type: <primitive>' when a Parquet primitive column has no reader branch — the physical Parquet type cannot be decoded into the expected Iceberg/Flink value (terminal catch-all in the reader builder).
Source
Thrown at flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/data/FlinkParquetReaders.java:342
return new ParquetValueReaders.ByteArrayReader(desc);
case INT32:
if (expected.typeId() == org.apache.iceberg.types.Type.TypeID.LONG) {
return new ParquetValueReaders.IntAsLongReader(desc);
} else {
return new ParquetValueReaders.UnboxedReader<>(desc);
}
case FLOAT:
if (expected.typeId() == org.apache.iceberg.types.Type.TypeID.DOUBLE) {
return new ParquetValueReaders.FloatAsDoubleReader(desc);
} else {
return new ParquetValueReaders.UnboxedReader<>(desc);
}
case BOOLEAN:
case INT64:
case DOUBLE:
return new ParquetValueReaders.UnboxedReader<>(desc);
default:
throw new UnsupportedOperationException("Unsupported type: " + primitive);
}
}
}
private static class BinaryDecimalReader
extends ParquetValueReaders.PrimitiveReader<DecimalData> {
private final int precision;
private final int scale;
BinaryDecimalReader(ColumnDescriptor desc, int precision, int scale) {
super(desc);
this.precision = precision;
this.scale = scale;
}
@Override
public DecimalData read(DecimalData ignored) {
Binary binary = column.nextBinary();View on GitHub (pinned to 86d9c8fc54)
Solutions
- Identify the offending physical type from the message and rewrite the files with standard types (e.g. INT64 millis timestamps).
- Re-write files with `rewrite_data_files` to normalize physical encodings.
- Exclude/projection-drop the problematic column while reading.
- Upgrade iceberg-flink if the type gained reader support.
Example fix
// before // column written as INT96 timestamp // after // rewrite parquet with INT64 (TIMESTAMP_MICROS) and read again
Defensive patterns
Strategy: validation
Validate before calling
// inspect physical parquet types before reading
ParquetFileReader pfr = ParquetFileReader.open(conf, path);
MessageType schema = pfr.getFooter().getFileMetaData().getSchema();
schema.getFields().forEach(f -> LOG.info("parquet field: {} {}", f.getName(), f.asPrimitiveType())); Try / catch
try (CloseableIterable<RowData> rows = reader.read()) {
rows.forEach(out::collect);
} catch (UnsupportedOperationException e) {
if (e.getMessage().startsWith("Unsupported type")) {
throw new IOException("Unsupported Parquet physical type: " + e.getMessage(), e);
}
throw e;
} Prevention
- Avoid INT96 and nonstandard physical types when producing Parquet externally.
- Rewrite files with iceberg rewrite actions after format changes.
- Check physical types with parquet-tools before registering external files.
When it happens
Trigger: Reading Parquet files whose physical column type for an Iceberg primitive is not among the handled cases (e.g. unexpected INT96 or an unsupported FIXED_LEN_BYTE_ARRAY usage).
Common situations: Parquet files written by external tools with nonstandard physical types; parquet-avro INT96 timestamps; schema evolution leaving old physical 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
- Unsupported type:
- Unsupported logical type: ${primitive.getOriginalType()}
- Unsupported type: ${primitive}
- Unsupported base type for decimal: ${primitiveTypeName}
- Unsupported timestamp type: ${timestamps}
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/ba70aa4709cf3686.
Report an issue: GitHub.