apache/druid · error · java.lang.UnsupportedOperationException
attempt to get boolean[] null vector from string[] only scal
Error message
attempt to get boolean[] null vector from string[] only scalar binding
What it means
The getNullVector accessor of the string-only input bindings is also unsupported: null bitmaps for the single string input are provided via other accessors, and any request for a boolean[] null vector throws UnsupportedOperationException.
Source
Thrown at processing/src/main/java/org/apache/druid/segment/virtual/SingleStringInputDeferredEvaluationExpressionDimensionVectorSelector.java:171
}
@Override
public long[] getLongVector(String name)
{
throw new UnsupportedOperationException("attempt to get long[] from string[] only scalar binding");
}
@Override
public double[] getDoubleVector(String name)
{
throw new UnsupportedOperationException("attempt to get double[] from string[] only scalar binding");
}
@Nullable
@Override
public boolean[] getNullVector(String name)
{
throw new UnsupportedOperationException("attempt to get boolean[] null vector from string[] only scalar binding");
}
}
}
View on GitHub (pinned to 9b90983fd2)
Solutions
- Use getStringVector and its companion null handling instead of getNullVector for this binding
- Adjust the expression to handle nulls via string-level functions (e.g. coalesce on string)
- Disable vectorization as a workaround
- Avoid custom expressions that require typed null vectors against string-only bindings
Example fix
// before // expression calls bindings.getNullVector(name) // after // use bindings.getStringVector(name) and treat null/empty strings per expression semantics
Defensive patterns
Strategy: try-catch
Validate before calling
// do not request getNullVector from string-only bindings; use getStringVector null semantics instead
Try / catch
try {
boolean[] nulls = bindings.getNullVector(name);
} catch (UnsupportedOperationException e) {
// derive nulls from getStringVector contents instead
} Prevention
- Use getStringVector plus per-row null checks for string-only bindings
- Avoid expressions that unconditionally request typed null vectors
- Disable vectorization when expressions need typed null vector access
When it happens
Trigger: Vector engine or expression evaluation calls getNullVector(name) on the bindings created by SingleStringInputDeferredEvaluationExpressionDimensionVectorSelector.
Common situations: Vectorized expressions with nullable-typed inputs over string columns; custom expression nodes that unconditionally request null vectors.
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
- attempt to get long[] from string[] only scalar binding
- attempt to get double[] from string[] only scalar binding
- unsupported type
- Selector must have a dictionary
- Selector of class[%s] does not have a dictionary, cannot use
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/92739ac234be0743.
Report an issue: GitHub.