apache/iceberg · error · java.lang.UnsupportedOperationException
Unsupported SymbolType.
Error message
Unsupported SymbolType.
What it means
FlinkTypeVisitor throws UnsupportedOperationException for SymbolType, Flink's type for internal symbol tokens (used by some internal functions/state). There is no Iceberg equivalent, so conversion is rejected.
Solutions
- Replace the symbol column with an equivalent STRING or INT representation before writing.
- Cast the symbol to STRING in the query feeding the Iceberg table.
- Exclude symbol columns from the Iceberg table schema.
- Subclass FlinkTypeVisitor and override visit(SymbolType) with a custom mapping.
Example fix
// before col 'sym' SYMBOL(*) // after col 'sym' STRING -- cast the symbol to string upstream
Defensive patterns
Strategy: validation
Validate before calling
for (Column col : resolvedSchema.getColumns()) {
if (col.getDataType().getLogicalType() instanceof SymbolType) {
throw new IllegalArgumentException("Column '" + col.getName() + "' is a SYMBOL; cast to STRING/INT before persisting");
}
} Try / catch
try {
Schema s = FlinkSchemaUtil.toIcebergSchema(flinkSchema);
} catch (UnsupportedOperationException e) {
if (e.getMessage().contains("SymbolType")) {
// cast symbol columns to STRING upstream
} else {
throw e;
}
} Prevention
- Cast symbol-typed results to STRING/INT before writing to Iceberg tables.
- Avoid persisting internal symbol columns.
- Pre-validate schemas before conversion.
When it happens
Trigger: Schema conversion encountering a column of type SymbolType (e.g. from internal function results or certain connectors), dispatching to visit(SymbolType).
Common situations: Persisting results of internal Flink functions (like certain windowing/state markers) into Iceberg tables; exotic connector columns surfaced as symbols.
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 DayTimeIntervalType.
- Unsupported DistinctType.
- Unsupported NullType.
- Unsupported RawType.
- Unsupported StructuredType.
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/c34493eadc67f532.
Report an issue: GitHub.
Appendix: source
Thrown at flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/FlinkTypeVisitor.java:73
@Override
public T visit(StructuredType structuredType) {
throw new UnsupportedOperationException("Unsupported StructuredType.");
}
@Override
public T visit(NullType nullType) {
throw new UnsupportedOperationException("Unsupported NullType.");
}
@Override
public T visit(RawType<?> rawType) {
throw new UnsupportedOperationException("Unsupported RawType.");
}
@Override
public T visit(SymbolType<?> symbolType) {
throw new UnsupportedOperationException("Unsupported SymbolType.");
}
@Override
public T visit(LogicalType other) {
throw new UnsupportedOperationException("Unsupported type: " + other);
}
}
View on GitHub (pinned to 86d9c8fc54)