prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Unsupported column type %s

What it means

TpchRecordSet$ rowMap converts each TPCH column value to a Presto value based on the column's declared type's Java type (long, double, or Slice). If the column type's Java type is none of these, it throws a PrestoException with code NOT_SUPPORTED. This is a defensive check: the TPCH connector only supports those Java type mappings.

Source

Thrown at presto-tpch/src/main/java/com/facebook/presto/tpch/TpchRecordSet.java:245

            TupleDomain<ColumnHandle> rowTupleDomain = TupleDomain.fromFixedValues(rowMap);

            return predicate.contains(rowTupleDomain);
        }

        private Object getPrestoObject(TpchColumn<E> column, Type type)
        {
            if (type.getJavaType() == long.class) {
                return getLong(column);
            }
            else if (type.getJavaType() == double.class) {
                return getDouble(column);
            }
            else if (type.getJavaType() == Slice.class) {
                return getSlice(column);
            }
            else {
                throw new PrestoException(NOT_SUPPORTED, format("Unsupported column type %s", type.getDisplayName()));
            }
        }

        private TpchColumn<E> getTpchColumn(int field)
        {
            return columns.get(field);
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check the column handle's PrestoType for the offending field and confirm it maps to a supported Java type (long, double, or Slice).
  2. Add a branch in rowMap for the new Java type (e.g. convert to long via getLong, or handle the object type).
  3. Align TpchMetadata type mapping with TpchRecordSet so every mapped type has a corresponding rowMap branch.

Example fix

// before
else if (type.getJavaType() == Slice.class) {
    return getSlice(column);
}
else {
    throw new PrestoException(NOT_SUPPORTED, format("Unsupported column type %s", type.getDisplayName()));
}
// after
else if (type.getJavaType() == boolean.class) {
    return getBoolean(column);
}
else {
    throw new PrestoException(NOT_SUPPORTED, format("Unsupported column type %s", type.getDisplayName()));
}
Defensive patterns

Strategy: try-catch

Validate before calling

for (TpchColumnHandle h : columnHandles) {
    Type t = h.getColumnType();
    if (t.getJavaType() != long.class && t.getJavaType() != double.class && t.getJavaType() != Slice.class) {
        throw new IllegalArgumentException("Column type not rowMap-supported: " + t.getDisplayName());
    }
}

Try / catch

try {
    recordSet = new TpchRecordSet<>(...);
} catch (PrestoException e) {
    if (e.getErrorCode().getCode() == NOT_SUPPORTED.toErrorCode().getCode()) {
        // fall back to generic row decoding
    }
    throw e;
}

Prevention

When it happens

Trigger: Reading rows from a TPCH table whose column handle type resolves to a Java type other than long.class, double.class, or Slice.class — i.e. a PrestoType mapped in TpchMetadata that rowMap was not written to handle (e.g. boolean, Date/DateTime object types).

Common situations: After extending the connector to return new Presto types (e.g. TIMESTAMP/BOOLEAN columns) without updating TpchRecordSet's rowMap; querying a table whose column handles were created with an unexpected type due to a version mismatch.

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