ErrLookup › Background articles › Presto NOT_SUPPORTED error: what "not supported" means and how to fix it
Presto NOT_SUPPORTED error: what "not supported" means and how to fix it
NOT_SUPPORTED is a Presto error code raised when the engine or a connector (Hive, Iceberg, JDBC, Hudi, SingleStore) reaches an operation it deliberately does not implement — an unsupported type coercion, an unsupported SQL feature like USE, an unsupported compression codec, or a type without comparison or binding support. This page explains why Presto throws NOT_SUPPORTED, the most common triggers, and the general ways to work around it.
Distilled from 156 documented records across 3 repositories.
Background
NOT_SUPPORTED is not a crash; it is Presto telling you, at a specific and intentional checkpoint, that the operation you asked for is real but unimplemented for your exact combination of types, features, or configuration. PrestoException carries a code plus a message, and NOT_SUPPORTED is chosen (rather than GENERIC_INTERNAL_ERROR or INVALID) precisely when the failure is a known capability boundary, not a bug. Across the 156 documented records, the message text varies widely — "Unsupported coercion from %s to %s", "USE statement is not supported", "Unsupported column type", "createContext not supported" — but the code is the constant a developer actually sees in the client.
The checkpoints cluster into a few layers. At the type-system layer, many operations only work for types that implement equality or comparison: index-join predicates, histogram keys, and sorted page merges all call Type.equalTo or compareTo, and when a type lacks that operator the engine wraps the underlying NotSupportedException as NOT_SUPPORTED. At the storage/connector layer, type translation is the biggest source: Hive read-time coercions after ALTER TABLE support only a fixed transition matrix (integer upscaling, varchar<->integer, float->double, element-wise nested coercions), Parquet decoding distinguishes INT96 12-byte timestamps and short (<=8-byte) decimals, and JDBC/Hudi/SingleStore connectors reject column types their remote engines cannot represent or bind. At the SQL/planning layer, some statements and clauses are simply unimplemented — USE is unconditionally rejected, MV definitions with LIMIT or non-AND WHERE predicates are refused, and cross-catalog materialized views require legacy_materialized_views=false.
A third cluster is configuration and capability discovery. The ORC and temp-file writers throw NOT_SUPPORTED when handed an unsupported compression codec, DWRF encryption setting, or writer feature; the router rejects an unknown scheduler type; distributed procedures throw "createContext not supported" when a connector never implemented them; and the Hive metastore bridge refuses schema renames because the Thrift API cannot actually perform one. In these cases the error fires before or during setup, not mid-scan. A few records are even guard rails against ambiguity or corruption: "Multiple tables matched" fires when a JDBC lookup resolves to more than one remote table, and "Unexpected table present in Hive metastore" fires when a system-table-shaped name is found where it must never exist.
From the caller's side, NOT_SUPPORTED usually arrives during planning or statement setup rather than mid-scan, and the message names the offending type, feature, or value. The right response is almost never "retry": the engine means what it says. Either restate the query within the supported envelope (CAST to a supported type, rewrite the predicate, qualify the table name), change the configuration to a supported value, or physically rewrite your data/DDL so the unsupported case disappears. Which envelope applies is library- and connector-specific — the Hive coercion matrix, the SingleStore type mapping, and the MV rewrite whitelist all differ — so always read the message's named type or feature against the documented capabilities of the exact connector and Presto version you run.
Common causes
- Unsupported type coercion after a Hive column type change. ALTER TABLE changes a column to a type outside the supported coercion set (e.g. string->date, int->double, tinyint->float), and querying old files then hits HiveCoercer/HiveCoercionRecordCursor.createCoercer's terminal throw. Only integer upscaling, int<->varchar, float->double, and element-wise nested coercions are supported.
- Column type not representable or bindable by a connector. JDBC page sinks and pushdown, Hudi partition keys, and the SingleStore type mapping reject Presto types the remote engine cannot handle — e.g. timestamptz, uuid, json, HyperLogLog, or complex/nested partition columns. The driver's setObject or the type translator fails and NOT_SUPPORTED carries the type's display name.
- Type lacking equality or comparison support. Index-join predicates, histogram keys, and sorted page merges call Type.equalTo/compareTo, which throws NotSupportedException for certain complex or unimplemented types. Presto wraps it as NOT_SUPPORTED, so the fix is to CAST the key to a scalar type or order by individual struct fields.
- Unimplemented SQL feature or MV definition construct. USE is unconditionally rejected; materialized-view definitions with LIMIT, non-AND WHERE predicates, or cross-catalog base tables (in legacy mode) are refused; MV rewrite only handles whitelisted aggregate functions and in-range GROUP BY ordinals. Restate the query within the supported grammar.
- Unsupported writer or configuration option. ORC/DWRF writers and temp-file writers throw NOT_SUPPORTED for unsupported compression codecs, encryption settings, or feature combinations; the router rejects an unrecognized scheduler type; catalogs without temp-table DDL fail CTE materialization. Check the message for the exact unsupported feature and set a supported value.
- Mismatched Parquet physical layout. The INT96 timestamp decoder requires exactly 12 bytes, and the short-decimal decoder requires values that fit in 8 bytes with proper sign extension; INT64 timestamps or decimals wider than 64 bits routed through these paths throw NOT_SUPPORTED. Fix the reader type mapping or the file's schema annotation.
- Ambiguous or malformed identifier resolution. "Multiple tables matched" fires when a JDBC name lookup returns more than one remote object (case-insensitive collisions, synonyms/views sharing a name), and Iceberg table names must match the table[@version][#branch][$type] grammar with at most one version marker. Rename the duplicate or correct the name format.
- Capability genuinely absent on the platform or metastore. Hive metastores cannot rename schemas, connectors that never override DistributedProcedure.createContext cannot run distributed procedures, and JVM/OS combinations without the platform non-blocking SecureRandom algorithm fail at startup paths. Use the supported alternative (drop+recreate, local procedure, standard JDK).
What usually fixes it
- Cast or restate within the supported envelope: CAST unsupported column, predicate, or key types to broadly supported scalars (varchar, bigint, timestamp), rewrite NOT/OR/BETWEEN/LIMIT constructs into supported forms, and fully qualify table names instead of relying on USE.
- Physically rewrite data instead of relying on read-time conversion: use CREATE TABLE AS SELECT with explicit CAST and swap tables (or INSERT OVERWRITE with casts) so files match the declared schema — this resolves the whole class of coercion and Parquet-layout errors.
- Fix configuration to a supported value: compression codecs, ORC/DWRF writer options, router scheduler types, legacy_materialized_views, CTE materialization catalogs, and JDBC driver versions — the error message names the offending feature; check it against your Presto version's documented options.
- Resolve identifiers unambiguously: use exact-case quoted identifiers on case-folding databases, remove duplicates/synonyms that collide with table names, follow the Iceberg name grammar (one of @version or #branch), and never create tables with system-table-shaped names.
- Treat NOT_SUPPORTED as a design signal, not a transient fault: verify connector and type capabilities before writing DDL or queries (partition on primitive types, whitelist-friendly aggregates in MVs), and treat idempotent cases like killing an already-finished query as success in automation.
- Upgrade when the capability was added later: newer Presto versions, JDBC drivers, and JDK distributions expand supported coercions, type comparisons, codecs, and platform algorithms — check release notes against the named feature before rewriting everything.
Documented occurrences
- NOT_SUPPORTED: Unsupported coercion from %s to %s (prestodb/presto)
- NOT_SUPPORTED: Multiple tables matched: ${schemaTableName} (prestodb/presto)
- NOT_SUPPORTED: Cross-catalog materialized views require legacy_materialized_views=false. (prestodb/presto)
- NOT_SUPPORTED: Could not read unscaled value into a short decimal from column (prestodb/presto)
- NOT_SUPPORTED: e.getMessage() (prestodb/presto)
- NOT_SUPPORTED: Parquet timestamp must be 12 bytes, actual (prestodb/presto)
- NOT_SUPPORTED: Unsupported coercion from %s to %s (prestodb/presto)
- NOT_SUPPORTED: Unsupported function for materialized view rewrite: %s (prestodb/presto)
- NOT_SUPPORTED: Unsupported data type in EXPLAIN (TYPE IO): %s (prestodb/presto)
- NOT_SUPPORTED: Only column specifications connected by logical AND are supported in WHERE clause. (prestodb/presto)
- NOT_SUPPORTED: Unsupported column type: ${type.displayName} (prestodb/presto)
- NOT_SUPPORTED: %s (prestodb/presto)
- NOT_SUPPORTED: createContext not supported (prestodb/presto)
- NOT_SUPPORTED: Partition key type %s not supported (prestodb/presto)
- NOT_SUPPORTED: Hive metastore does not support renaming schemas (prestodb/presto)
- NOT_SUPPORTED: %s is not supported in your OS (prestodb/presto)
- NOT_SUPPORTED: USE statement is not supported (prestodb/presto)
- NOT_SUPPORTED: NOT_SUPPORTED (message from NotSupportedException) (prestodb/presto)
- NOT_SUPPORTED: Limit clause is not supported in query optimizer (prestodb/presto)
- NOT_SUPPORTED: GROUP BY ordinal %d is out of range (1 to %d) (prestodb/presto)
…and 136 more across the corpus — use search.
Honest provenance: generated on 2026-09-04 from AI-assisted analysis of the linked records. See how records are made.