apache/iceberg · error · UnsupportedOperationException
Unsupported ZonedTimestampType.
Error message
Unsupported ZonedTimestampType.
What it means
The default FlinkTypeVisitor.visit(ZonedTimestampType) throws UnsupportedOperationException because Iceberg has no mapping for Flink's TIMESTAMP_WITH_LOCAL_TIME_ZONE zoned timestamp type. Any visitor-based Flink-to-Iceberg type conversion (e.g. FlinkTypeUtil.toIcebergType / schema conversion) hits this when the Flink type tree contains a zoned timestamp.
Solutions
- Change the column type to plain `TIMESTAMP(6)` (without local time zone) in the Flink DDL.
- Cast the LTZ column to TIMESTAMP in the pipeline before writing to Iceberg.
- Use a custom LogicalTypeVisitor subclass that overrides visit(ZonedTimestampType) with a project-specific mapping (e.g. TimestamptzType) if your Iceberg/Flink versions support it.
Example fix
// before CREATE TABLE t (event_ts TIMESTAMP(3) WITH LOCAL TIME ZONE); // after CREATE TABLE t (event_ts TIMESTAMP(6));
Defensive patterns
Strategy: type-guard
Validate before calling
if (dataType.getLogicalType() instanceof ZonedTimestampType) {
throw new IllegalArgumentException("Use TIMESTAMP(6) instead of TIMESTAMP WITH LOCAL TIME ZONE for Iceberg");
} Type guard
boolean isUnsupported = t instanceof ZonedTimestampType || t instanceof YearMonthIntervalType || t instanceof DayTimeIntervalType || t instanceof DistinctType || t instanceof StructuredType || t instanceof NullType || t instanceof RawType<?> || t instanceof SymbolType<?>;
Try / catch
try {
icebergType = FlinkTypeUtil.toIcebergType(dataType);
} catch (UnsupportedOperationException e) {
// fall back to a supported type or surface a clear migration message
} Prevention
- Use TIMESTAMP(6) instead of TIMESTAMP_LTZ in Iceberg-bound DDLs.
- Screen source schemas for LTZ columns during pipeline design.
When it happens
Trigger: Converting a Flink schema containing a TIMESTAMP(3) WITH LOCAL TIME ZONE column to an Iceberg type via FlinkTypeVisitor; calling FlinkSchemaUtil/FlinkTypeToType on such a column.
Common situations: DDLs using `TIMESTAMP_LTZ` or `TIMESTAMP WITH LOCAL TIME ZONE` columns (common for event-time ingestion from Kafka/Debezium) mapped to Iceberg tables.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- Unsupported ZonedTimestampType.
- Avro does not support LOCAL TIMESTAMP type with precision
- Avro does not support LOCAL TIMESTAMP type with precision…
- Avro does not support TIMESTAMP type with precision
- Avro does not support TIMESTAMP type with precision
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/3c504facb42a6541.
Report an issue: GitHub.
Appendix: source
Thrown at flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/FlinkTypeVisitor.java:38
import org.apache.flink.table.types.logical.DayTimeIntervalType;
import org.apache.flink.table.types.logical.DistinctType;
import org.apache.flink.table.types.logical.LogicalType;
import org.apache.flink.table.types.logical.LogicalTypeVisitor;
import org.apache.flink.table.types.logical.NullType;
import org.apache.flink.table.types.logical.RawType;
import org.apache.flink.table.types.logical.StructuredType;
import org.apache.flink.table.types.logical.SymbolType;
import org.apache.flink.table.types.logical.YearMonthIntervalType;
import org.apache.flink.table.types.logical.ZonedTimestampType;
public abstract class FlinkTypeVisitor<T> implements LogicalTypeVisitor<T> {
// ------------------------- Unsupported types ------------------------------
@Override
public T visit(ZonedTimestampType zonedTimestampType) {
throw new UnsupportedOperationException("Unsupported ZonedTimestampType.");
}
@Override
public T visit(YearMonthIntervalType yearMonthIntervalType) {
throw new UnsupportedOperationException("Unsupported YearMonthIntervalType.");
}
@Override
public T visit(DayTimeIntervalType dayTimeIntervalType) {
throw new UnsupportedOperationException("Unsupported DayTimeIntervalType.");
}
@Override
public T visit(DistinctType distinctType) {
throw new UnsupportedOperationException("Unsupported DistinctType.");
}
@OverrideView on GitHub (pinned to 86d9c8fc54)