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];
}
@OverrideView on GitHub (pinned to 55bb57d202)
Solutions
- Change the partition column's type to a supported one (string, bigint, date, timestamp, decimal).
- Recreate the table with standard partition-key types and repartition the data.
- Cast in the query won't help (error happens at split setup) — fix the metastore schema instead.
- 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
- Use only standard types (string/bigint/date/timestamp/decimal) for partition keys.
- Validate DDL from external tools before pointing Presto at new tables.
- Cast awkward partition types to varchar at table creation time, not query time.
- Check connector release notes for newly supported prefill types before upgrading schemas.
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
- NOT_SUPPORTED
- HIVE_BAD_DATA
- Unsupported column type:
- Expected field to be %s, actual %s (field %s)
- NOT_SUPPORTED
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/cc39b64e92ceb6ce.
Report an issue: GitHub.