prestodb/presto · error · PinotException
PINOT_UNSUPPORTED_COLUMN_TYPE
PINOT_UNSUPPORTED_COLUMN_TYPE
Error message
type '' not supported
What it means
PinotBrokerPageSource.setValue throws PinotException(PINOT_UNSUPPORTED_COLUMN_TYPE) when a value read from a Pinot broker query response must be written into a Presto block, but the column's Presto Type is not supported by the Pinot connector. This first check catches types that fail isTypeSupportInPinot(type) — i.e. types the connector has no mapping/decoding path for — before any per-type write logic runs. It means the selected table column has a type the connector cannot materialize.
Source
Thrown at presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotBrokerPageSource.java:154
}
blockBuilder.closeEntry();
}
else {
setValue(type, blockBuilder, asText(value));
}
}
protected void setValue(Type type, BlockBuilder blockBuilder, String value)
{
if (blockBuilder == null) {
return;
}
if (value == null) {
blockBuilder.appendNull();
return;
}
if (!isTypeSupportInPinot(type)) {
throw new PinotException(PINOT_UNSUPPORTED_COLUMN_TYPE, Optional.empty(), "type '" + type + "' not supported");
}
if (type instanceof FixedWidthType) {
completedBytes += ((FixedWidthType) type).getFixedSize();
if (type instanceof BigintType) {
type.writeLong(blockBuilder, parseDouble(value).longValue());
}
else if (type instanceof IntegerType) {
blockBuilder.writeInt(parseDouble(value).intValue());
}
else if (type instanceof TinyintType) {
blockBuilder.writeByte(parseDouble(value).byteValue());
}
else if (type instanceof SmallintType) {
blockBuilder.writeShort(parseDouble(value).shortValue());
}
else if (type instanceof BooleanType) {
type.writeBoolean(blockBuilder, parseBoolean(value));
}View on GitHub (pinned to 55bb57d202)
Solutions
- Cast the offending column to a supported type in the query (e.g. CAST(col AS VARCHAR) or CAST(col AS BIGINT))
- Check isTypeSupportInPinot in PinotBrokerPageSource/PinotColumnHandle to see which types are supported, and avoid selecting unsupported columns
- Refresh the connector's schema metadata (restart coordinator or invalidate the Pinot table schema cache) if the Pinot schema changed recently
- Upgrade the Presto/Pinot connector version so newer Pinot types are mapped
- Exclude the unsupported column from SELECT * and list only supported columns explicitly
Example fix
// before SELECT * FROM pinot_table // after SELECT CAST(unsupported_col AS VARCHAR) AS unsupported_col, id FROM pinot_table
Defensive patterns
Strategy: validation
Validate before calling
-- Inspect the mapped schema before querying; avoid unsupported types
SELECT column_name, data_type FROM information_schema.columns
WHERE table_schema = 'pinot_schema' AND table_name = 'my_table';
-- Or in code: only pass supported types to the Pinot connector
Set<Class<?>> supported = Set.of(BigintType.class, IntegerType.class, DoubleType.class,
RealType.class, TimestampType.class, DateType.class, VarcharType.class, VarbinaryType.class); Type guard
boolean isPinotSupported(Type type) {
return type instanceof BigintType || type instanceof IntegerType
|| type instanceof SmallintType || type instanceof TinyintType
|| type instanceof DoubleType || type instanceof RealType
|| type instanceof TimestampType || type instanceof DateType
|| type instanceof VarcharType || type instanceof VarbinaryType;
} Try / catch
try (PinotBrokerPageSource source = ...) {
return source.getNextPage();
} catch (PinotException e) {
if (e.getErrorCode() == PINOT_UNSUPPORTED_COLUMN_TYPE.toErrorCode()) {
throw new IllegalArgumentException("Query selects a column type the Pinot connector cannot decode; cast it or drop it");
}
throw e;
} Prevention
- Avoid SELECT * on Pinot tables; list only columns with supported types
- Cast derived/exotic expressions to VARCHAR or BIGINT at query time
- Re-sync metadata when the Pinot schema changes; avoid stale cached column types
- Keep connector and Presto versions aligned with the Pinot cluster version
- Add integration tests that query every column of the table to catch unmapped types early
When it happens
Trigger: A query selects a Pinot column whose mapped Presto type is not in the connector's supported set (checked by isTypeSupportInPinot) — e.g. exotic Pinot derived/multi-value columns, map/array types, or types added to Pinot but not to the connector — and the broker page source tries to decode the JSON value into that type.
Common situations: Schema evolution: a column was added or its type changed in Pinot after the connector cached metadata; queries with function-derived expressions producing unsupported types; selecting RAW/JSON or multi-value Pinot columns directly; connector version older than the Pinot cluster's type surface.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/5aabb3b56788b4ca.
Report an issue: GitHub.