apache/druid · error · UnsupportedOperationException
Vectorized matcher cannot make object matcher for ARRAY type
Error message
Vectorized matcher cannot make object matcher for ARRAY types
What it means
ArrayVectorValueMatcher cannot build an object-value matcher for ARRAY columns in the vectorized engine; comparing whole array objects against a match value is unsupported, so makeMatcher(Object, ColumnType) unconditionally throws UnsupportedOperationException.
Source
Thrown at processing/src/main/java/org/apache/druid/query/filter/vector/ArrayVectorValueMatcher.java:56
VectorObjectSelector selector
)
{
this.columnType = columnType;
this.selector = selector;
}
@Override
public VectorValueMatcher makeMatcher(@Nullable String value)
{
throw new UnsupportedOperationException(
"Vectorized matcher cannot make string matcher for ARRAY types"
);
}
@Override
public VectorValueMatcher makeMatcher(Object matchValue, ColumnType matchValueType)
{
throw new UnsupportedOperationException(
"Vectorized matcher cannot make object matcher for ARRAY types"
);
}
@Override
public VectorValueMatcher makeMatcher(DruidPredicateFactory predicateFactory)
{
final DruidObjectPredicate<Object[]> predicate = predicateFactory.makeArrayPredicate(columnType);
return new BaseVectorValueMatcher(selector)
{
final VectorMatch match = VectorMatch.wrap(new int[selector.getMaxVectorSize()]);
@Override
public ReadableVectorMatch match(final ReadableVectorMatch mask, boolean includeUnknown)
{
final Object[] vector = selector.getObjectVector();
final int[] selection = match.getSelection();
View on GitHub (pinned to 9b90983fd2)
Solutions
- Use a DruidPredicateFactory matcher (makeMatcher(DruidPredicateFactory)) which is supported for array vectors, or filter on unnested columns.
- Turn off vectorization for the query (set vectorize=false in the query context) to use the non-vectorized array comparison path.
- Express the filter as an array-aware filter (e.g. via SQL ARRAY functions compiled to supported filters).
Example fix
// before vectorMatcher.makeMatcher(arrayValueList, ColumnType.ofArray(...)); // after vectorMatcher.makeMatcher(v -> v != null && v.equals(expectedArray)); // DruidPredicateFactory path, or disable vectorization
Defensive patterns
Strategy: validation
Validate before calling
if (columnType.isArray() && matchValue != null) { /* route to predicate-based or non-vectorized path */ } Type guard
boolean supportsObjectMatcher = !columnType.isArray();
Try / catch
try { matcher = arrayMatcher.makeMatcher(matchValue, matchValueType); } catch (UnsupportedOperationException e) { matcher = null; /* fallback path */ } Prevention
- Avoid object-value equality filters on ARRAY columns under vectorization
- Use predicate-factory matchers for array vectors
- Force non-vectorized execution for array-equality queries
When it happens
Trigger: Vectorized selector/in-style filters supplying an object match value (e.g. a List for array comparison) against an ARRAY-typed column.
Common situations: Attempts to vectorize array-equality filters; internal engine paths choosing the vector engine for queries filtering ARRAY columns by value.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Vectorized matcher cannot make string matcher for ARRAY type
- Aggregator[%s] cannot vectorize
- Cardinality aggregator does not support[%s] inputs
- Filter[%s] cannot vectorize
- Vectorized groupBys on ARRAY columns are not yet implemented
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/1d5591fdf771e538.
Report an issue: GitHub.