prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Unsupported type 

What it means

Field's copy constructor maps a source field's Presto Type to an internal typed value (Boolean, Long, Double, VARBINARY byte copy, VARCHAR string, etc.). If the Type is none of the supported kinds, it throws PrestoException NOT_SUPPORTED with the offending type. The accumulo connector simply does not model that Presto type in Field.

Source

Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/Field.java:118

            this.value = field.getShort();
        }
        else if (type.equals(TIME)) {
            this.value = new Time(field.getTime().getTime());
        }
        else if (type.equals(TIMESTAMP)) {
            this.value = new Timestamp(field.getTimestamp().getTime());
        }
        else if (type.equals(TINYINT)) {
            this.value = field.getByte();
        }
        else if (type.equals(VARBINARY)) {
            this.value = Arrays.copyOf(field.getVarbinary(), field.getVarbinary().length);
        }
        else if (type.equals(VARCHAR)) {
            this.value = field.getVarchar();
        }
        else {
            throw new PrestoException(NOT_SUPPORTED, "Unsupported type " + type);
        }
    }

    public Type getType()
    {
        return type;
    }

    public Block getArray()
    {
        return (Block) value;
    }

    public Long getLong()
    {
        return (Long) value;
    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Change the table schema so the column uses a supported type (BOOLEAN, BIGINT/INTEGER, DOUBLE, VARCHAR, VARBINARY, etc.).
  2. Cast the column to a supported type in the query before writing/reading through the accumulo connector (e.g., CAST(ts AS VARCHAR)).
  3. Upgrade the presto-accumulo connector if a newer version supports the type, or patch Field's constructor to add a mapping.
  4. Check which column/type triggered it from the message suffix and review the DDL for that column.

Example fix

// before: unsupported column type
CREATE TABLE t (ts TIMESTAMP, v VARCHAR);
// after: cast to a supported type
CREATE TABLE t (ts VARCHAR, v VARCHAR); -- or CAST(ts AS VARCHAR) on insert
Defensive patterns

Strategy: validation

Validate before calling

// check column types against the supported set before writing
Set<Type> supported = ImmutableSet.of(BOOLEAN, BIGINT, INTEGER, DOUBLE, VARCHAR, VARBINARY);
for (ColumnHandle col : columns) {
    Type t = types.get(col);
    if (!supported.contains(t)) throw new IllegalArgumentException("Unsupported accumulo type: " + t);
}

Type guard

boolean isFieldTypeSupported(Type t) {
    return t.equals(BOOLEAN) || t.equals(BIGINT) || t.equals(INTEGER) ||
           t.equals(DOUBLE) || t instanceof VarcharType || t.equals(VARBINARY);
}

Try / catch

try {
    Field f = new Field(type, source);
} catch (PrestoException e) {
    // NOT_SUPPORTED: cast or drop the offending column before retry
    throw e;
}

Prevention

When it happens

Trigger: Constructing a Field from a value whose Type is an unsupported kind — e.g., TIME, TIMESTAMP, TIME_WITH_TIME_ZONE, JSON, IPADDRESS, or a nested type not handled by the constructor's if/else chain.

Common situations: A table column was declared with a type the connector doesn't support (e.g., TIMESTAMP) and a row write/serialization tries to wrap that column value in a Field; a custom connector extension passes exotic types into the accumulo writer; schema changed to a new Presto type not supported by the installed connector version.

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/2c48b848847b679c. Report an issue: GitHub.