prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Unsupported column type: 

What it means

The SingleStore connector cannot map the given Presto (SPI) column type to any SingleStore SQL type in toSqlType. Types time with time zone, timestamp with time zone, and UUID have no supported SingleStore equivalent and are explicitly rejected with NOT_SUPPORTED. The error surfaces during DDL translation (CREATE TABLE/AS SELECT) involving such columns.

Source

Thrown at presto-singlestore/src/main/java/com/facebook/presto/plugin/singlestore/SingleStoreClient.java:140

                new String[] {"TABLE", "VIEW"});
    }

    @Override
    protected String getTableSchemaName(ResultSet resultSet)
            throws SQLException
    {
        return resultSet.getString("TABLE_CAT");
    }

    @Override
    protected String toSqlType(Type type)
    {
        if (REAL.equals(type)) {
            return "float";
        }
        if (TIME_WITH_TIME_ZONE.equals(type) ||
                TIMESTAMP_WITH_TIME_ZONE.equals(type) || UUID.equals(type)) {
            throw new PrestoException(NOT_SUPPORTED, "Unsupported column type: " + type.getDisplayName());
        }
        if (TIMESTAMP.equals(type)) {
            return "datetime";
        }
        if (VARBINARY.equals(type)) {
            return "mediumblob";
        }
        if (isVarcharType(type)) {
            VarcharType varcharType = (VarcharType) type;
            if (varcharType.isUnbounded()) {
                return "longtext";
            }
            if (varcharType.getLengthSafe() <= 21844) {
                return super.toSqlType(type);
            }
            if (varcharType.getLengthSafe() <= 16777215) {
                return "mediumtext";
            }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Change the table schema to use timestamp (without time zone) or time instead of the *with time zone* variants, normalizing to a fixed zone in the query
  2. Cast uuid columns to varchar before writing, and store them as varchar in SingleStore
  3. Use CAST in the CTAS/INSERT query so no unsupported type reaches the connector's type mapping

Example fix

-- before
CREATE TABLE singlestore.db.t AS SELECT cast(ts as timestamp with time zone) AS ts FROM src;
-- after
CREATE TABLE singlestore.db.t AS SELECT with_timezone_cast(ts, 'UTC') AS ts FROM src; -- or cast to plain timestamp
-- alternative: CAST(uuid_col AS VARCHAR)
Defensive patterns

Strategy: validation

Validate before calling

static final Set<TypeSignature> UNSUPPORTED = Set.of(timeWithTimeZone, timestampWithTimeZone, uuid);
// before CTAS/INSERT, check result column types
for (Column c : resultColumns) {
    if (UNSUPPORTED.contains(c.getType().getTypeSignature()))
        throw new IllegalArgumentException("Cast column " + c.getName() + " before writing to SingleStore");
}

Type guard

boolean isSingleStoreWritable(Type type) {
    String name = type.getTypeSignature().getBase().toString();
    return !(name.equals("time with time zone")
        || name.equals("timestamp with time zone")
        || name.equals("uuid"));
}

Try / catch

try {
    execute(ctasSql);
} catch (PrestoException e) {
    if ("NOT_SUPPORTED".equals(e.getErrorCode().getName()) && e.getMessage().startsWith("Unsupported column type")) {
        // rewrite query with casts and retry once
    } else throw e;
}

Prevention

When it happens

Trigger: Executing CREATE TABLE or CREATE TABLE AS in the singlestore catalog with a column of type time with time zone, timestamp with time zone, or uuid; or inserting query results containing these types into a SingleStore table.

Common situations: Migrating schemas from engines that support these types (e.g. Postgres timestamptz/uuid) into SingleStore via Presto CTAS; joins/queries producing timestamp with time zone from other connectors being written to SingleStore.

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