prestodb/presto · error · PrestoException
DECODER_CONVERSION_NOT_SUPPORTED
DECODER_CONVERSION_NOT_SUPPORTED
Error message
could not parse non-value node as '%s' for column '%s'
What it means
SecondsSinceEpochJsonFieldDecoder.getMillis multiplies the decoded second-precision value by 1000. If the mapped JsonNode is not a numeric node (int/long/biginteger) and is not even a value node (i.e. it is an object or array), the decoder cannot obtain a numeric value and throws PrestoException(DECODER_CONVERSION_NOT_SUPPORTED, "could not parse non-value node ..."). Numeric nodes that overflow or are non-numeric text instead surface via the companion catch-all error.
Source
Thrown at presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/SecondsSinceEpochJsonFieldDecoder.java:81
extends AbstractDateTimeJsonValueProvider
{
public SecondsSinceEpochJsonValueProvider(JsonNode value, DecoderColumnHandle columnHandle)
{
super(value, columnHandle);
}
@Override
protected long getMillis()
{
try {
if (value.isIntegralNumber()
&& !value.isBigInteger()) {
return multiplyExact(value.longValue(), 1000);
}
if (value.isValueNode()) {
return multiplyExact(parseLong(value.asText()), 1000);
}
throw new PrestoException(
DECODER_CONVERSION_NOT_SUPPORTED,
format("could not parse non-value node as '%s' for column '%s'", columnHandle.getType(), columnHandle.getName()));
}
catch (NumberFormatException | ArithmeticException e) {
throw new PrestoException(
DECODER_CONVERSION_NOT_SUPPORTED,
format("could not parse value '%s' as '%s' for column '%s'", value.asText(), columnHandle.getType(), columnHandle.getName()));
}
}
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Update the column mapping to the scalar field, e.g. mapping = 'time.sec'.
- Validate sample payloads against the table definition after any producer schema change.
- If compound time (seconds+nanos) is emitted, precompute a single seconds value upstream.
- Fall back to varchar decoding plus Presto JSON functions for irregular structures.
Example fix
// before -- event_time ... data_format='seconds-since-epoch', mapping='time' // after -- event_time ... data_format='seconds-since-epoch', mapping='time.sec'
Defensive patterns
Strategy: validation
Validate before calling
JsonNode n = mapper.readTree(sampleJson).at("time.sec");
if (!n.isValueNode() || !(n.isNumber() || n.isTextual())) throw new IllegalStateException("seconds-since-epoch mapping must target a scalar numeric node"); Try / catch
try { runQuery(sql); } catch (SQLException e) { if (e.getMessage().contains("non-value node")) { log.error("Mapping points at container node; fix column mapping"); } else throw e; } Prevention
- Map to the exact leaf path of the seconds value.
- Confirm seconds-vs-millis semantics with the producer before choosing a decoder.
- Validate with a sample message whenever the payload schema evolves.
When it happens
Trigger: Column with dataFormat 'seconds-since-epoch' whose mapping resolves to a JSON object or array, e.g. payload '{"time": {"sec": 1700000000}}' mapped as 'time'; the isValueNode() check fails and the exception is thrown before any arithmetic.
Common situations: Producer nested or restructured the timestamp field; mapping points to a wrapper object; arrays used for compound time values (sec/nanos).
Related errors
- DECODER_CONVERSION_NOT_SUPPORTED
- DECODER_CONVERSION_NOT_SUPPORTED
- invalid mapping format '%s' for column '%s'
- TimestampWithTimeZone overflow: %s ms
- nanos must be in range [0, 999_999_999]:
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/b5d060125bf3ee2c.
Report an issue: GitHub.