prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Type not supported for Iceberg: 

What it means

toIcebergType converts Presto types to Iceberg types. After handling all known mappings (including timestamp with time zone and UUID), any remaining type reaches the fallthrough throw PrestoException(NOT_SUPPORTED, "Type not supported for Iceberg: <displayName>"). The connector cannot represent that Presto type in an Iceberg schema.

Source

Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/TypeConverter.java:231

        if (type instanceof ArrayType) {
            return fromArray((ArrayType) type);
        }
        if (type instanceof MapType) {
            return fromMap((MapType) type);
        }
        if (type instanceof TimeType) {
            return Types.TimeType.get();
        }
        if (type instanceof TimestampType) {
            return Types.TimestampType.withoutZone();
        }
        if (type instanceof TimestampWithTimeZoneType) {
            return Types.TimestampType.withZone();
        }
        if (type instanceof UuidType) {
            return Types.UUIDType.get();
        }
        throw new PrestoException(NOT_SUPPORTED, "Type not supported for Iceberg: " + type.getDisplayName());
    }

    public static HiveType toHiveType(Type type)
    {
        return HiveType.toHiveType(toHiveTypeInfo(type));
    }

    private static org.apache.iceberg.types.Type fromDecimal(DecimalType type)
    {
        return Types.DecimalType.of(type.getPrecision(), type.getScale());
    }

    public static org.apache.iceberg.types.Type fromRow(RowType type, int startId)
    {
        List<Types.NestedField> fields = new ArrayList<>();
        for (RowType.Field field : type.getFields()) {
            String name = field.getName().orElseThrow(() ->
                    new PrestoException(NOT_SUPPORTED, "Row type field does not have a name: " + type.getDisplayName()));

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Replace the unsupported column type with a supported equivalent (e.g. timestamp(3) with time zone instead of timestamp, VARCHAR instead of json where needed)
  2. Cast unsupported columns during CTAS: CAST(ts AS timestamp(3) with time zone)
  3. For opaque types (HyperLogLog, SetDigest), store serialized VARBINARY instead
  4. Check connector docs/version for the supported type-mapping table and upgrade Presto if a mapping was added later

Example fix

// before
CREATE TABLE iceberg.t (ts timestamp) ...
// after
CREATE TABLE iceberg.t (ts timestamp(3) with time zone) ...
Defensive patterns

Strategy: validation

Validate before calling

Set<String> unsupported = Set.of("time", "ipaddress", "hyperloglog", "setdigest", "json");
for (ColumnDef c : columns) {
    if (unsupported.contains(c.typeBase())) throw new IllegalArgumentException("Type not supported for Iceberg: " + c.type);
}

Type guard

boolean isIcebergCompatible(Type t) {
    return t instanceof BooleanType || t instanceof IntegerType || t instanceof BigIntType
        || t instanceof RealType || t instanceof DoubleType || t instanceof DecimalType
        || t instanceof VarcharType || t instanceof CharType || t instanceof VarbinaryType
        || t instanceof DateType || t instanceof TimestampWithTimeZoneType || t instanceof UuidType;
}

Try / catch

try { /* CREATE TABLE / CTAS on iceberg */ } catch (PrestoException e) {
    if (e.getErrorCode().getName().equals("NOT_SUPPORTED")) {
        // message names the unsupported type; cast or redesign the schema
    } else { throw e; }
}

Prevention

When it happens

Trigger: CREATE TABLE AS / CREATE TABLE with Iceberg using a Presto type with no Iceberg counterpart — e.g. timestamp without time zone in older versions, time, IPADDRESS, hyperloglog, setdigest, json (in some versions), or other non-mapped types.

Common situations: CTAS from a Hive/JDBC table carrying exotic types into Iceberg; using internal/aggregate types (HyperLogLog, SetDigest) as columns; timestamp columns without time zone on connectors/versions lacking mapping.

Understand the failure class

Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/0b297ca78a0e8929. Report an issue: GitHub.