prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Unsupported column type %s for prefilled column: %s

What it means

HiveRecordCursor prefills partition-key values into the cursor without reading files. Prefill only supports primitive types with dedicated converters; if a partition key's declared type has no prefill path, it throws NOT_SUPPORTED naming the type and column.

Source

Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveRecordCursor.java:162

                    slices[columnIndex] = varcharPartitionKey(columnValue, name, type);
                }
                else if (isCharType(type)) {
                    slices[columnIndex] = charPartitionKey(columnValue, name, type);
                }
                else if (DATE.equals(type)) {
                    longs[columnIndex] = datePartitionKey(columnValue, name);
                }
                else if (TIMESTAMP.equals(type)) {
                    longs[columnIndex] = timestampPartitionKey(session.getSqlFunctionProperties().isLegacyTimestamp(), columnValue, hiveStorageTimeZone, name);
                }
                else if (isShortDecimal(type)) {
                    longs[columnIndex] = shortDecimalPartitionKey(columnValue, (DecimalType) type, name);
                }
                else if (isLongDecimal(type)) {
                    slices[columnIndex] = longDecimalPartitionKey(columnValue, (DecimalType) type, name);
                }
                else {
                    throw new PrestoException(NOT_SUPPORTED, format("Unsupported column type %s for prefilled column: %s", type.getDisplayName(), name));
                }
            }
        }
    }

    @Override
    public long getCompletedBytes()
    {
        return delegate.getCompletedBytes();
    }

    @Override
    public Type getType(int field)
    {
        return types[field];
    }

    @Override

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Change the partition column's type to a supported one (string, bigint, date, timestamp, decimal).
  2. Recreate the table with standard partition-key types and repartition the data.
  3. Cast in the query won't help (error happens at split setup) — fix the metastore schema instead.
  4. Upgrade Presto if a newer version added prefill support for the type.

Example fix

-- before: partition key of unsupported type (e.g. binary)
CREATE TABLE t (...) PARTITIONED BY (pk binary);
-- after
CREATE TABLE t (...) PARTITIONED BY (pk varchar);
Defensive patterns

Strategy: validation

Validate before calling

-- verify partition key types are pref supported before querying
SHOW COLUMNS FROM table_name; -- check partition column types
-- supported: boolean, bigint, integer, smallint, tinyint, date, timestamp, varchar, decimal

Try / catch

catch (PrestoException e) {
    if ("NOT_SUPPORTED".equals(e.getErrorCode().getName())
            && e.getMessage().contains("prefilled column")) {
        // fix partition column type in metastore or recreate table
    }
}

Prevention

When it happens

Trigger: HiveRecordCursor constructor builds prefilled partition columns; a partition key column's type is neither boolean, bigint/integer-family, date, timestamp, varchar/string, nor short/long decimal, so no branch matches.

Common situations: Partition key declared as an exotic type (e.g. binary, map/array as partition key, char of odd size), tables created by external tools writing unusual partition column types, version mismatches where a newer type was added as partition key.

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