{"record":{"id":"113eed40ab12f135","repo":"apache/druid","slug":"table-decoding-not-supported-for-s","errorCode":null,"errorMessage":"Table decoding not supported for %s","messagePattern":"Table decoding not supported for (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java","lineNumber":464,"sourceCode":"      for (int i = 0; i < length; i++) {\n        int index = indexes[outPosition + i] - indexOffset;\n        if (index >= limit) {\n          return i;\n        }\n\n        out[outPosition + i] = base + get(index);\n      }\n\n      return length;\n    }\n\n    /**\n     * Unpack a contiguous vector of long values at the specified start index of length and lookup and replace stored\n     * values based on their index in the supplied value lookup 'table'\n     */\n    default void getTable(long[] out, int outPosition, int startIndex, int length, long[] table)\n    {\n      throw new UOE(\"Table decoding not supported for %s\", this.getClass().getSimpleName());\n    }\n\n    /**\n     * Unpack a contiguous vector of long values at the specified indexes and lookup and replace stored values based on\n     * their index in the supplied value lookup 'table'\n     */\n    default int getTable(\n        long[] out,\n        int outPosition,\n        int[] indexes,\n        int length,\n        int indexOffset,\n        int limit,\n        long[] table\n    )\n    {\n      for (int i = 0; i < length; i++) {\n        int index = indexes[outPosition + i] - indexOffset;","sourceCodeStart":446,"sourceCodeEnd":482,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java#L446-L482","documentation":"VSizeLongSerde long-column encodings that do not implement table-based decoding throw this UnsupportedOperationException from the default ColumnarLongsSupplier.getLongMulti/getTable default method. It means the requested vectorized 'lookup and replace' decode path is unavailable for the concrete LongValueEncoding in use. It is a 'this encoding doesn't support this operation' guard, not data corruption.","triggerScenarios":"Calling getTable(long[], int, int, int, long[]) (or vectorized table-based decoding via a LongValueEncoding that only overrides fill/forEach) on a column written with an encoding that lacks table decode support, e.g. a VSizeLongSerde v1-encoded column without table-decoding support.","commonSituations":"Running vectorized group-by/search queries over older segments whose long column encoding predates table decoding support; mixing Druid versions where a broker routes vectorized work to a historical with older segment files.","solutions":["Verify the segment's long column encoding; re-ingest or re-index the segment with a current Druid version so the column is written with table-decoding-capable encoding","Fall back to the non-table decode path: catch UOE and re-run the query with vectorization disabled (set druid.query.vectorize=false or use non-vectorized selectors)","Upgrade Druid on the node serving the segment so the encoding implements getTable"],"exampleFix":"// before\nencoding.getTable(out, outPosition, startIndex, length, table);\n// after\ntry {\n  encoding.getTable(out, outPosition, startIndex, length, table);\n} catch (UnsupportedOperationException e) {\n  encoding.fill(out, outPosition, startIndex, length); // non-table fallback\n}","handlingStrategy":"try-catch","validationCode":"// Java: check if the encoding supports table decoding before use\nif (encoding.getClass().getSimpleName().equals(\"LongEncodingReader\")) { /* fall back */ }","typeGuard":"boolean supportsTableDecode(ColumnarLongsSerializer encoding) {\n  try { encoding.getClass().getMethod(\"getTable\", long[].class, int.class, int.class, int.class, long[].class); return true; }\n  catch (NoSuchMethodException e) { return false; }\n}","tryCatchPattern":"try {\n  encoding.getTable(out, outPosition, startIndex, length, table);\n} catch (UnsupportedOperationException e) {\n  // fall back to non-table decode\n  encoding.fill(out, outPosition, startIndex, length);\n}","preventionTips":["Re-index old segments so long columns use table-decoding-capable encodings","Keep historical nodes on a Druid version compatible with the segments they serve","Test vectorized queries against oldest retained segments before rolling out query features"],"tags":["segment-decoding","vectorized-query","unsupported-encoding"],"backgroundTag":"unsupported-operation","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"}