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
DefaultJsonFieldDecoder.getBoolean only supports scalar JSON value nodes; it reads value.asBoolean(). If the mapped node is a container (object/array) or missing/non-value node, it throws PrestoException DECODER_CONVERSION_NOT_SUPPORTED. This means the JSON structure does not match the declared boolean column.
Source
Thrown at presto-record-decoder/src/main/java/com/facebook/presto/decoder/json/DefaultJsonFieldDecoder.java:131
this.value = value;
this.columnHandle = columnHandle;
this.minValue = minValue;
this.maxValue = maxValue;
}
@Override
public final boolean isNull()
{
return value.isMissingNode() || value.isNull();
}
@Override
public boolean getBoolean()
{
if (value.isValueNode()) {
return value.asBoolean();
}
throw new PrestoException(
DECODER_CONVERSION_NOT_SUPPORTED,
format("could not parse non-value node as '%s' for column '%s'", columnHandle.getType(), columnHandle.getName()));
}
@Override
public long getLong()
{
try {
long longValue;
if (value.isIntegralNumber() && !value.isBigInteger()) {
longValue = value.longValue();
if (longValue >= minValue && longValue <= maxValue) {
return longValue;
}
}
else if (value.isValueNode()) {
longValue = parseLong(value.asText());
if (longValue >= minValue && longValue <= maxValue) {View on GitHub (pinned to 55bb57d202)
Solutions
- Inspect the raw JSON at the mapped field to confirm it is a scalar boolean
- Fix the column mapping (mapping/dataFormat) to point at a boolean-valued field
- Adjust producer schema to emit a boolean for this field
- Remove or retype the column if the field legitimately holds complex JSON
Example fix
// before (row)
{"flag":{"value":true}} mapped to column flag:boolean
// after
{"flag":true} or remap the column to flag.value Defensive patterns
Strategy: validation
Validate before calling
boolean ok = jsonNode.path(fieldName).isBoolean();
Type guard
static boolean isBooleanField(JsonNode n) { return n != null && n.isValueNode() && n.isBoolean(); } Try / catch
try { boolean b = decoder.getBoolean(); } catch (PrestoException e) { if (e.getErrorCode().getName().equals("DECODER_CONVERSION_NOT_SUPPORTED")) { handleBadRow(); } else throw e; } Prevention
- Keep topic schema primitive and flat for decoded columns
- Verify mapping paths point at scalar fields
- Alert on non-value nodes via a JSON schema validator at ingest
When it happens
Trigger: A boolean column mapped to a JSON field whose node is an object or array (isValueNode() false), e.g. the field holds nested JSON instead of true/false.
Common situations: Misconfigured JSON path/column mapping pointing at a nested object; producers switched from boolean to object payloads; schema drift between topic and table definition.
Related errors
- ELASTICSEARCH_TYPE_MISMATCH
- DECODER_CONVERSION_NOT_SUPPORTED
- DECODER_CONVERSION_NOT_SUPPORTED
- Invalid array block:
- Invalid map block:
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/589aa2ae2fdd0706.
Report an issue: GitHub.