apache/druid · error · UOE
makeJsonTreeExtractor has not been implemented.
Error message
makeJsonTreeExtractor has not been implemented.
What it means
The FlattenerMaker interface provides makeJsonTreeExtractor as an optional (default) method that throws UOE("makeJsonTreeExtractor has not been implemented."). It is only invoked when a flattenSpec contains a TREE-type fieldSpec; flattener implementations that never implemented tree extraction will throw this at create() time via ObjectFlatteners.create().
Source
Thrown at processing/src/main/java/org/apache/druid/java/util/common/parsers/ObjectFlatteners.java:247
*/
Object getRootField(T obj, String key);
/**
* Create a "field" extractor for {@link com.jayway.jsonpath.JsonPath} expressions
*/
Function<T, Object> makeJsonPathExtractor(String expr);
/**
* Create a "field" extractor for 'jq' expressions
*/
Function<T, Object> makeJsonQueryExtractor(String expr);
/**
* Create a "field" extractor for nested json expressions
*/
default Function<T, Object> makeJsonTreeExtractor(List<String> nodes)
{
throw new UOE("makeJsonTreeExtractor has not been implemented.");
}
/**
* Convert object to Java {@link Map} using {@link #getJsonProvider()} and {@link #finalizeConversionForMap} to
* extract and convert data
*/
default Map<String, Object> toMap(T obj)
{
final Object mapOrNull = toPlainJavaType(obj);
if (mapOrNull == null) {
return Collections.emptyMap();
}
return (Map<String, Object>) mapOrNull;
}
/**
* Recursively traverse "json" object using a {@link JsonProvider}, converting to Java {@link Map} and {@link List},
* potentially transforming via {@link #finalizeConversionForMap} as we goView on GitHub (pinned to 9b90983fd2)
Solutions
- Remove the TREE-type fieldSpec or switch it to a supported type (path, jq, json_query) for this parser
- Use a parser/flattener whose FlattenerMaker overrides makeJsonTreeExtractor (e.g. the JSON parser's default JSONFlattenerMaker)
- Check which parseSpec format you are using and consult its supported flattener types
Example fix
// before
{"type":"tree","name":"val","nodes":["a","b"]}
// after
{"type":"path","name":"val","expr":"$.a.b"} Defensive patterns
Strategy: validation
Validate before calling
boolean supportsTree = maker instanceof TreeCapableFlattenerMaker; // or per-parser documentation
if (spec.getFlattener().stream().anyMatch(fs -> fs.getType().equals("tree")) && !supportsTree) {
throw new IllegalArgumentException("tree fieldSpecs unsupported for this parser");
} Try / catch
try { flattener = ObjectFlatteners.create(spec, maker); } catch (UOE e) { if (e.getMessage().contains("makeJsonTreeExtractor")) { /* fall back to path-based spec */ } throw e; } Prevention
- Use TREE fieldSpecs only with parsers whose flattener maker implements makeJsonTreeExtractor
- Prefer path/jq types when unsure of parser support
- Consult the parser's supported flattenSpec types in the Druid docs
When it happens
Trigger: Using a flattenSpec with a fieldSpec of type "tree" against a FlattenerMaker implementation (e.g. a parser whose flattener maker only supports PATH/JQ) that has not overridden makeJsonTreeExtractor.
Common situations: Adding "type":"tree" fieldSpecs to an ingestion spec for a format whose parser does not support tree extraction; upgrading/migrating specs across formats where only some parsers implement tree flattening.
Related errors
- ORC flattener does not support JQ
- ORC flattener does not support nested root queries
- Casting to float type is not supported
- Casting to long type is not supported
- Not implemented
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/c5a64a92ad8041f0.
Report an issue: GitHub.