prestodb/presto · error · IllegalArgumentException
unknown data format '%s' for column '%s'
Error message
unknown data format '%s' for column '%s'
What it means
HashRedisRowDecoderFactory.chooseFieldDecoder selects a field decoder based on the column's dataFormat. For hash decoders only the default (null dataFormat) and 'iso8601' for BIGINT (long) columns are supported; any other dataFormat string throws IllegalArgumentException naming the format and column.
Source
Thrown at presto-redis/src/main/java/com/facebook/presto/redis/decoder/hash/HashRedisRowDecoderFactory.java:55
return new HashRedisRowDecoder(chooseFieldDecoders(columns));
}
private Map<DecoderColumnHandle, RedisFieldDecoder<String>> chooseFieldDecoders(Set<DecoderColumnHandle> columns)
{
return columns.stream()
.collect(ImmutableMap.toImmutableMap(identity(), this::chooseFieldDecoder));
}
private RedisFieldDecoder<String> chooseFieldDecoder(DecoderColumnHandle column)
{
checkArgument(!column.isInternal(), "unexpected internal column '%s'", column.getName());
if (column.getDataFormat() == null) {
return new HashRedisFieldDecoder();
}
if (column.getType().getJavaType() == long.class && "iso8601".equals(column.getDataFormat())) {
return new ISO8601HashRedisFieldDecoder();
}
throw new IllegalArgumentException(format("unknown data format '%s' for column '%s'", column.getDataFormat(), column.getName()));
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Remove the unsupported dataFormat attribute so the default HashRedisFieldDecoder is used
- Use dataFormat='iso8601' only on BIGINT columns
- If a timestamp string is needed, store/declare as VARCHAR without iso8601 and parse in SQL with date_parse
Example fix
// before event_time TIMESTAMP WITH (dataFormat='iso8601') -- hash decoder requires BIGINT // after event_time BIGINT WITH (dataFormat='iso8601')
Defensive patterns
Strategy: validation
Validate before calling
String df = column.getDataFormat();
if (df != null && !("iso8601".equals(df) && column.getType() == BIGINT)) {
throw new IllegalArgumentException("unsupported dataFormat for hash decoder: " + df);
} Try / catch
try { Decoder d = HashRedisRowDecoderFactory.create(...); } catch (IllegalArgumentException e) { log.error("bad column definition: " + e.getMessage()); throw e; } Prevention
- Only use dataFormat='iso8601' with BIGINT columns in hash tables
- Don't copy Kafka decoder options into Redis hash DDL
- Validate table definitions against connector-supported formats
When it happens
Trigger: A Redis hash-table column declares an unsupported dataFormat value (e.g. 'epochmillis', 'bytes', 'json') or uses 'iso8601' on a non-BIGINT (e.g. VARCHAR) column.
Common situations: Copying decoder options from other connectors (Kafka supports more formats) into Redis hash DDL; typo in 'iso8601'; applying iso8601 to a VARCHAR timestamp column.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/8daa8afd09f4d1e1.
Report an issue: GitHub.