apache/druid · error · RE
Non-primitive supplied to primitive conversion
Error message
Non-primitive supplied to primitive conversion: %s (this should never happen)
What it means
Type-guard in ParquetGroupConverter.convertPrimitiveField: a logical type (e.g. LIST, MAP, or another group-based type) reached the primitive-conversion switch, meaning a non-primitive field was dispatched where only primitives are expected — 'this should never happen' per the schema, so it indicates a schema-handling bug or unexpected parquet schema.
Solutions
- Inspect the parquet schema for the field hitting this path; it may use an unusual logical/annotated type.
- Update parquet-extensions to a version supporting that schema shape.
- Flatten or re-write the data to use standard primitive types.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java:455 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/39da0626a393d611.
Report an issue: GitHub.
Appendix: source
Thrown at extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java:455
case BINARY:
Binary value = g.getBinary(fieldIndex, index);
return convertBinaryToDecimal(value, precision, scale);
default:
throw new RE(
"Unknown 'DECIMAL' type supplied to primitive conversion: %s (this should never happen)",
pt.getPrimitiveTypeName()
);
}
case UTF8:
case ENUM:
case JSON:
return g.getString(fieldIndex, index);
case LIST:
case MAP:
case MAP_KEY_VALUE:
case BSON:
default:
throw new RE(
"Non-primitive supplied to primitive conversion: %s (this should never happen)",
ot.name()
);
}
} else {
// fallback to handling the raw primitive type if no logical type mapping
switch (pt.getPrimitiveTypeName()) {
case BOOLEAN:
return g.getBoolean(fieldIndex, index);
case INT32:
return g.getInteger(fieldIndex, index);
case INT64:
return g.getLong(fieldIndex, index);
case FLOAT:
return g.getFloat(fieldIndex, index);
case DOUBLE:
return g.getDouble(fieldIndex, index);
case INT96:View on GitHub (pinned to 9b90983fd2)