apache/druid · error · java.lang.UnsupportedOperationException
extractValue without an aggregator factory is not supported.
Error message
extractValue without an aggregator factory is not supported.
What it means
The ColumnValueSelector created by FixedBucketsHistogramSerde.makeColumnValueSelector without an AggregatorFactory throws UnsupportedOperationException from extractValue(InputRow, String). The serde can only extract histogram values when it knows the expected aggregator factory (to deserialize/validate); the no-factory overload is intentionally unsupported for this complex type.
Source
Thrown at extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogramSerde.java:69
return FixedBucketsHistogramAggregator.TYPE_NAME;
}
@Override
public ComplexMetricExtractor getExtractor()
{
return new ComplexMetricExtractor()
{
@Override
public Class<FixedBucketsHistogram> extractedClass()
{
return FixedBucketsHistogram.class;
}
@Nullable
@Override
public Object extractValue(InputRow inputRow, String metricName)
{
throw new UnsupportedOperationException("extractValue without an aggregator factory is not supported.");
}
@Override
public FixedBucketsHistogram extractValue(InputRow inputRow, String metricName, AggregatorFactory agg)
{
Object rawValue = inputRow.getRaw(metricName);
FixedBucketsHistogramAggregatorFactory aggregatorFactory = (FixedBucketsHistogramAggregatorFactory) agg;
if (rawValue == null) {
FixedBucketsHistogram fbh = new FixedBucketsHistogram(
aggregatorFactory.getLowerLimit(),
aggregatorFactory.getUpperLimit(),
aggregatorFactory.getNumBuckets(),
aggregatorFactory.getOutlierHandlingMode()
);
fbh.incrementMissing();
return fbh;View on GitHub (pinned to 9b90983fd2)
Solutions
- Use the three-argument extractValue(inputRow, metricName, AggregatorFactory) overload, supplying the FixedBucketsHistogramAggregatorFactory.
- Ensure ingestion paths that materialize column values pass the aggregator factory so the serde can decode base64/JSON histograms.
- If only raw values are needed, use inputRow.getRaw(metricName) instead of the selector's extractValue.
Example fix
// before Object v = selector.extractValue(row, "myHist"); // after Object v = selector.extractValue(row, "myHist", new FixedBucketsHistogramAggregatorFactory(...));
Defensive patterns
Strategy: try-catch
Try / catch
try {
Object v = selector.extractValue(row, metricName);
} catch (UnsupportedOperationException e) {
Object v = selector.extractValue(row, metricName, aggregatorFactory);
} Prevention
- Always call the AggregatorFactory overload when working with fixedBucketsHistogram columns.
- Use inputRow.getRaw() when only the raw serialized value is needed.
- Keep custom ingestion code aware that this serde requires factory context for extraction.
When it happens
Trigger: Calling the two-argument extractValue(inputRow, metricName) on the selector produced by FixedBucketsHistogramSerde, or framework code that reads column values without passing the AggregatorFactory.
Common situations: Custom ingestion/stream-parsing code using the no-factory selector API against a fixedBucketsHistogram column; generic value-extraction utilities that ignore aggregator factories.
Related errors
- FixedBucketsHistogramBufferAggregator does not support getFl
- FixedBucketsHistogramBufferAggregator does not support getLo
- FixedBucketsHistogramBufferAggregator does not support getDo
- Unknown type:
- HistogramAggregator does not support getLong()
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/462f21637e7ca4b7.
Report an issue: GitHub.