{"record":{"id":"8dbca3eaac495850","repo":"apache/druid","slug":"value-vector-is-not-supported-yet","errorCode":null,"errorMessage":"VALUE_VECTOR is not supported yet","messagePattern":"VALUE_VECTOR is not supported yet","errorType":"exception","errorClass":"UnsupportedOperationException (UOE)","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/query/scan/ScanQueryLimitRowIterator.java","lineNumber":98,"sourceCode":"          {\n            this.yield();\n            return in;\n          }\n        }\n    );\n  }\n\n  @Override\n  public boolean hasNext()\n  {\n    return !yielder.isDone() && count < limit;\n  }\n\n  @Override\n  public ScanResultValue next()\n  {\n    if (ScanQuery.ResultFormat.RESULT_FORMAT_VALUE_VECTOR.equals(resultFormat)) {\n      throw new UOE(ScanQuery.ResultFormat.RESULT_FORMAT_VALUE_VECTOR + \" is not supported yet\");\n    }\n\n    // We want to perform multi-event ScanResultValue limiting if we are not time-ordering or are at the\n    // inner-level if we are time-ordering\n    if (query.getTimeOrder() == Order.NONE ||\n        !query.context().getBoolean(ScanQuery.CTX_KEY_OUTERMOST, true)) {\n      ScanResultValue batch = yielder.get();\n      List events = (List) batch.getEvents();\n      if (events.size() <= limit - count) {\n        count += events.size();\n        yielder = yielder.next(null);\n        return batch;\n      } else {\n        // last batch\n        // single batch length is <= Integer.MAX_VALUE, so this should not overflow\n        int numLeft = (int) (limit - count);\n        count = limit;\n        return new ScanResultValue(","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/query/scan/ScanQueryLimitRowIterator.java#L80-L116","documentation":"ScanQueryLimitRowIterator.next() explicitly rejects RESULT_FORMAT_VALUE_VECTOR, throwing UOE, because limiting logic is not implemented for the vectorized value format. It is checked before any limiting work begins.","triggerScenarios":"Running a scan query with resultFormat=valueVector through the path wrapped by ScanQueryLimitRowIterator (any query with a limit/offset that must be applied by this iterator).","commonSituations":"Testing newer vectorized scan formats not yet supported; tooling that sets resultFormat=valueVector programmatically for performance reasons.","solutions":["Change resultFormat to \"compactedList\" or \"list\"","Remove the valueVector setting until the format is supported","Drop the limit/offset if a custom path can consume valueVector directly"],"exampleFix":"// before\n{\"queryType\":\"scan\",\"resultFormat\":\"valueVector\",\"limit\":100,...}\n// after\n{\"queryType\":\"scan\",\"resultFormat\":\"list\",\"limit\":100,...}","handlingStrategy":"validation","validationCode":"if (query.getResultFormat() == ScanQuery.ResultFormat.RESULT_FORMAT_VALUE_VECTOR) {\n  throw new IllegalArgumentException(\"valueVector is unsupported for limited scans\");\n}","typeGuard":"boolean limitableFormat(ScanQuery q) { return q.getResultFormat() != ScanQuery.ResultFormat.RESULT_FORMAT_VALUE_VECTOR; }","tryCatchPattern":"try {\n  return limitIterator.next();\n} catch (UnsupportedOperationException e) {\n  // re-run with list/compactedList format\n}","preventionTips":["Never request valueVector for queries with limit/offset","Keep resultFormat at default for paginated scans","Track Druid releases for valueVector support before enabling it"],"tags":["druid","scan-query","unsupported-value","result-format"],"backgroundTag":"unsupported-enum-value","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}