prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
No lexicoder for type
What it means
LexicoderRowSerializer.getLexicoder resolves an Accumulo Lexicoder for a Presto Type from its LEXICODER_MAP; when a type has no registered lexicoder it throws NOT_SUPPORTED with 'No lexicoder for type <type>'. Called from encode/decode and list/map lexicoder resolution, so it blocks reading or writing that column.
Source
Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/serializers/LexicoderRowSerializer.java:396
{
return (T) getLexicoder(type).decode(value);
}
public static Lexicoder getLexicoder(Type type)
{
if (Types.isArrayType(type)) {
return getListLexicoder(type);
}
else if (Types.isMapType(type)) {
return getMapLexicoder(type);
}
else if (type instanceof VarcharType) {
return LEXICODER_MAP.get(VARCHAR);
}
else {
Lexicoder lexicoder = LEXICODER_MAP.get(type);
if (lexicoder == null) {
throw new PrestoException(NOT_SUPPORTED, "No lexicoder for type " + type);
}
return lexicoder;
}
}
private static ListLexicoder getListLexicoder(Type elementType)
{
ListLexicoder<?> listLexicoder = LIST_LEXICODERS.get(elementType.getTypeSignature());
if (listLexicoder == null) {
listLexicoder = new ListLexicoder(getLexicoder(Types.getElementType(elementType)));
LIST_LEXICODERS.put(elementType.getTypeSignature(), listLexicoder);
}
return listLexicoder;
}
private static MapLexicoder getMapLexicoder(Type type)
{
MapLexicoder<?, ?> mapLexicoder = MAP_LEXICODERS.get(type.getTypeSignature());View on GitHub (pinned to 55bb57d202)
Solutions
- Cast unsupported columns to supported types (BIGINT, DOUBLE, VARCHAR, VARBINARY) in the table schema
- Register a lexicoder for the type in LEXICODER_MAP (e.g. a custom Lexicoder) if maintaining a fork
- Use a different RowSerializer (e.g. ZookeeperRowSerializer or a custom one) for tables with exotic types
- Upgrade to a newer connector version with a broader LEXICODER_MAP
Example fix
// before
private static final Map<Type, Lexicoder<?>> LEXICODER_MAP = ImmutableMap.<Type, Lexicoder<?>>builder()
.put(BIGINT, new ULongLexicoder())...
.build();
// after
private static final Map<Type, Lexicoder<?>> LEXICODER_MAP = ImmutableMap.<Type, Lexicoder<?>>builder()
.put(BIGINT, new ULongLexicoder())
.put(DATE, new DateLexicoder())
.put(BOOLEAN, new BooleanLexicoder())...
.build(); Defensive patterns
Strategy: validation
Validate before calling
private static final Set<Type> LEXICODER_TYPES = ImmutableSet.of(BIGINT, DOUBLE, VARCHAR, VARBINARY, INTEGER, BOOLEAN);
if (!LEXICODER_TYPES.contains(type)) {
throw new IllegalArgumentException("No lexicoder registered for " + type);
} Type guard
static boolean hasLexicoder(Type t) {
return t != null && LEXICODER_MAP.containsKey(t) || t instanceof VarcharType || t instanceof BigintType;
} Try / catch
try {
byte[] bytes = serializer.encode(type, value);
} catch (PrestoException e) {
if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode().getCode()) {
// fall back to another serializer or fail the column
}
throw e;
} Prevention
- Restrict lexicoder-serialized tables to BIGINT, DOUBLE, VARCHAR, VARBINARY and compatible types
- Check LEXICODER_MAP coverage when introducing new column types
- Choose the serializer (Zookeeper vs lexicoder vs string) based on the full schema, not just current columns
- Test encode/decode round trips for every column type in CI
When it happens
Trigger: Encoding/decoding a column whose Type is absent from LEXICODER_MAP (commonly BOOLEAN, DATE, TIME, TIMESTAMP, DECIMAL, JSON, or any complex type whose element types also resolve to nothing), or using the serializer for a table whose schema contains such types.
Common situations: Table created with serializer=lexicoder but schema includes types added in later Presto versions; nested array/map element types unsupported; choosing lexicoder serializer for a table that previously used another serializer.
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
- INVALID_FUNCTION_ARGUMENT
- NOT_SUPPORTED
- UNEXPECTED_ACCUMULO_ERROR
- NOT_SUPPORTED
- UNEXPECTED_ACCUMULO_ERROR
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/82578c87ff61a18c.
Report an issue: GitHub.