apache/druid · warning · UnsupportedOperationException
Vectorized groupBys on ARRAY columns are not yet implemented
Error message
Vectorized groupBys on ARRAY columns are not yet implemented
What it means
GroupByVectorColumnProcessorFactory.makeArrayProcessor unconditionally throws UnsupportedOperationException: grouping on ARRAY-typed columns is not supported by the vectorized group-by engine. Any vectorized query grouping by an ARRAY column reaches this factory method and fails.
Source
Thrown at processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/vector/GroupByVectorColumnProcessorFactory.java:112
return new NullableDoubleGroupByVectorColumnSelector(selector);
}
@Override
public GroupByVectorColumnSelector makeLongProcessor(
final ColumnCapabilities capabilities,
final VectorValueSelector selector
)
{
if (capabilities.hasNulls().isFalse()) {
return new LongGroupByVectorColumnSelector(selector);
}
return new NullableLongGroupByVectorColumnSelector(selector);
}
@Override
public GroupByVectorColumnSelector makeArrayProcessor(ColumnCapabilities capabilities, VectorObjectSelector selector)
{
throw new UnsupportedOperationException(
"Vectorized groupBys on ARRAY columns are not yet implemented"
);
}
@Override
public GroupByVectorColumnSelector makeObjectProcessor(
final ColumnCapabilities capabilities,
final VectorObjectSelector selector
)
{
if (capabilities.is(ValueType.STRING)) {
if (capabilities.hasMultipleValues().isTrue()) {
throw new UnsupportedOperationException(
"Vectorized groupBys on multi-value dictionary-encoded dimensions are not yet implemented"
);
}
return new DictionaryBuildingSingleValueStringGroupByVectorColumnSelector(selector);
} else if (capabilities.is(ValueType.COMPLEX)) {View on GitHub (pinned to 9b90983fd2)
Solutions
- Disable vectorization for the query (context {"vectorize":"false"}).
- Convert the array to a scalar before grouping, e.g. via array_to_string or element access in an expression virtual column.
- Normalize arrays into separate rows/columns at ingestion if grouping per element is the goal.
Example fix
// before: GROUP BY arrayCol (vectorized)
// after: query context
{"vectorize":"false"}
// or group by expression: array_to_string(arrayCol, ',') Defensive patterns
Strategy: type-guard
Validate before calling
ColumnCapabilities caps = pool.getColumnCapabilities(column);
if (caps != null && caps.is(ValueType.ARRAY)) { /* route to non-vectorized engine */ } Type guard
boolean isArrayColumn(ColumnCapabilities caps) {
return caps != null && caps.is(ValueType.ARRAY);
} Try / catch
try {
runVectorized(query);
} catch (UnsupportedOperationException e) {
return runWithVectorizeDisabled(query);
} Prevention
- Disable vectorization for queries grouping by ARRAY columns
- Convert arrays to strings/scalars before grouping
- Review ARRAY-typed virtual columns used as group-by keys
When it happens
Trigger: A vectorized groupBy query with a grouping key whose column capabilities report ValueType.ARRAY, routed to the vector column processor factory's makeArrayProcessor.
Common situations: Druid 28+ ARRAY types used in groupBy dimensions; users experimenting with new ARRAY columns in aggregations; auto-vectorization picking up an array-typed virtual column.
Related errors
- Cardinality aggregator does not support[%s] inputs
- Vectorized matcher cannot make string matcher for ARRAY type
- Vectorized matcher cannot make object matcher for ARRAY type
- Vectorized groupBys on multi-value dictionary-encoded dimens
- cannot vectorize fixed bucket histogram aggregation for type
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/c01574974d5a4454.
Report an issue: GitHub.