{"record":{"id":"92739ac234be0743","repo":"apache/druid","slug":"attempt-to-get-boolean-null-vector-from-string","errorCode":null,"errorMessage":"attempt to get boolean[] null vector from string[] only scalar binding","messagePattern":"attempt to get boolean\\[\\] null vector from string\\[\\] only scalar binding","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/virtual/SingleStringInputDeferredEvaluationExpressionDimensionVectorSelector.java","lineNumber":171,"sourceCode":"    }\n\n    @Override\n    public long[] getLongVector(String name)\n    {\n      throw new UnsupportedOperationException(\"attempt to get long[] from string[] only scalar binding\");\n    }\n\n    @Override\n    public double[] getDoubleVector(String name)\n    {\n      throw new UnsupportedOperationException(\"attempt to get double[] from string[] only scalar binding\");\n    }\n\n    @Nullable\n    @Override\n    public boolean[] getNullVector(String name)\n    {\n      throw new UnsupportedOperationException(\"attempt to get boolean[] null vector from string[] only scalar binding\");\n    }\n  }\n}\n","sourceCodeStart":153,"sourceCodeEnd":175,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/virtual/SingleStringInputDeferredEvaluationExpressionDimensionVectorSelector.java#L153-L175","documentation":"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.","triggerScenarios":"Vector engine or expression evaluation calls getNullVector(name) on the bindings created by SingleStringInputDeferredEvaluationExpressionDimensionVectorSelector.","commonSituations":"Vectorized expressions with nullable-typed inputs over string columns; custom expression nodes that unconditionally request null vectors.","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"],"exampleFix":"// before\n// expression calls bindings.getNullVector(name)\n// after\n// use bindings.getStringVector(name) and treat null/empty strings per expression semantics","handlingStrategy":"try-catch","validationCode":"// do not request getNullVector from string-only bindings; use getStringVector null semantics instead","typeGuard":null,"tryCatchPattern":"try {\n  boolean[] nulls = bindings.getNullVector(name);\n} catch (UnsupportedOperationException e) {\n  // derive nulls from getStringVector contents instead\n}","preventionTips":["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"],"tags":["druid","vectorized-query","expression","type-mismatch"],"backgroundTag":"unsupported-operation","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}