prestodb/presto · error · IllegalArgumentException
Type %s is not supported
Error message
Type %s is not supported
What it means
RedisRecordCursor.getObject does not support returning arbitrary typed objects; it validates the field index and then unconditionally throws IllegalArgumentException with the column's type. Object-typed reads are simply not implemented for the Redis connector.
Source
Thrown at presto-redis/src/main/java/com/facebook/presto/redis/RedisRecordCursor.java:241
@Override
public Slice getSlice(int field)
{
return getFieldValueProvider(field, Slice.class).getSlice();
}
@Override
public boolean isNull(int field)
{
checkArgument(field < columnHandles.size(), "Invalid field index");
return currentRowValues == null || currentRowValues[field].isNull();
}
@Override
public Object getObject(int field)
{
checkArgument(field < columnHandles.size(), "Invalid field index");
throw new IllegalArgumentException(format("Type %s is not supported", getType(field)));
}
private FieldValueProvider getFieldValueProvider(int field, Class<?> expectedType)
{
checkArgument(field < columnHandles.size(), "Invalid field index");
checkFieldType(field, expectedType);
return currentRowValues[field];
}
private void checkFieldType(int field, Class<?> expected)
{
Class<?> actual = getType(field).getJavaType();
checkArgument(actual == expected, "Expected field %s to be type %s but is %s", field, expected, actual);
}
@Override
public void close()
{View on GitHub (pinned to 55bb57d202)
Solutions
- Read columns using the typed accessors: getLong, getDouble, getSlice, getBoolean, isNull instead of getObject
- Fix the calling tool/code to respect the column's declared type
- Avoid object-typed columns (row/map/array) in Redis connector table definitions
Example fix
// before Object v = cursor.getObject(field); // after long v = cursor.getLong(field); // or getSlice/getDouble per column type
Defensive patterns
Strategy: try-catch
Type guard
boolean supportsGetObject(RecordCursor c, int field) { return false; } // getObject is never supported by RedisRecordCursor Try / catch
try { v = cursor.getObject(field); } catch (IllegalArgumentException e) { v = readTyped(cursor, field, columnType); } Prevention
- Never call getObject on Redis cursors; use typed accessors
- Respect the column's declared Type in generic reader code
- Avoid object-typed columns in Redis connector tables
When it happens
Trigger: Calling RecordCursor.getObject(field) on a Redis cursor, e.g. from an engine or tool that always reads columns via getObject regardless of declared type.
Common situations: Third-party query tools or exporters that call getObject on every column; custom code iterating a Redis RecordCursor directly; connector used with engines that lack specialized typed readers.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- getCursorName
- SingleMapBlock does not support appendNull()
- SingleRowBlock does not support appendNull()
- getObjectValue is not supported for TIMESTAMP(
- toEpochMillis is not supported for TIMESTAMP(
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/7caa5b7d4620d346.
Report an issue: GitHub.