prestodb/presto · error · PrestoException

DRUID_UNSUPPORTED_TYPE_ERROR

DRUID_UNSUPPORTED_TYPE_ERROR

Error message

Unsupported type: %s

What it means

ColumnReader.createColumnReader() maps a Presto/TYPES type to a concrete Druid column reader (e.g. FloatColumnReader for REAL, TimestampColumnReader for TIMESTAMP). If the column's type is not one of the supported Bigint/Varchar/Real/Timestamp variants, it throws DRUID_UNSUPPORTED_TYPE_ERROR because no reader exists to decode values of that type from the segment.

Source

Thrown at presto-druid/src/main/java/com/facebook/presto/druid/column/ColumnReader.java:50

    static ColumnReader createColumnReader(Type type, ColumnValueSelector valueSelector)
    {
        if (type == VARCHAR) {
            return new StringColumnReader(valueSelector);
        }
        if (type.equals(DOUBLE)) {
            return new DoubleColumnReader(valueSelector);
        }
        if (type == BIGINT) {
            return new LongColumnReader(valueSelector);
        }
        if (type.equals(REAL)) {
            return new FloatColumnReader(valueSelector);
        }
        if (type == TIMESTAMP) {
            return new TimestampColumnReader(valueSelector);
        }
        throw new PrestoException(DRUID_UNSUPPORTED_TYPE_ERROR, format("Unsupported type: %s", type));
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check the segment's column type via the Druid coordinator/segment metadata and compare against the types supported by your connector version.
  2. Upgrade Presto to a version whose Druid connector supports the column type in question.
  3. Drop or exclude the unsupported column from the query/table definition (e.g. recreate the external table without that column).
  4. If the type mapping looks wrong, inspect DruidColumnHandle/DruidColumnType conversion code and fix the mapping or file a bug.

Example fix

// before
ColumnReader reader = ColumnReader.createColumnReader(unknownType, valueSelector); // throws Unsupported type

// after (guard before reading)
if (SUPPORTED_TYPES.contains(type)) {
    ColumnReader reader = ColumnReader.createColumnReader(type, valueSelector);
} else {
    throw new PrestoException(DRUID_UNSUPPORTED_TYPE_ERROR, "Skip or upgrade connector for type: " + type);
}
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Reading a Druid segment whose column metadata resolves to a type outside the supported set in createColumnReader — e.g. a newly introduced Druid column type, a complex/nested type, or a type mapping regression where the DruidColumnType-to-Type translation yields something other than BIGINT, VARCHAR, REAL, or TIMESTAMP.

Common situations: Druid cluster or connector version mismatch: newer Druid segments carry column types the installed Presto connector doesn't recognize; schema changes adding unsupported column kinds; misconfigured type mapping when registering external Druid tables.

Related errors


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