{"record":{"id":"a640f56908573963","repo":"apache/druid","slug":"unknown-encoding-strategy-s-a640f5","errorCode":null,"errorMessage":"unknown encoding strategy : %s","messagePattern":"unknown encoding strategy : (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/data/CompressionFactory.java","lineNumber":388,"sourceCode":"        return new EntireLayoutColumnarLongsSerializer(\n            columnName,\n            segmentWriteOutMedium,\n            new LongsLongEncodingWriter(order)\n        );\n      } else {\n        return new BlockLayoutColumnarLongsSerializer(\n            columnName,\n            segmentWriteOutMedium,\n            filenameBase,\n            order,\n            new LongsLongEncodingWriter(order),\n            compressionStrategy,\n            GenericIndexedWriter.MAX_FILE_SIZE,\n            closer\n        );\n      }\n    } else {\n      throw new IAE(\"unknown encoding strategy : %s\", encodingStrategy.toString());\n    }\n  }\n\n  // Float currently does not support any encoding types, and stores values as 4 byte float\n\n  /**\n   * Reads a column from a {@link ByteBuffer}, possibly using additional secondary files from a\n   * {@link SegmentFileMapper}.\n   *\n   * @param totalSize  number of rows in the column\n   * @param sizePer    number of values per compression buffer, for compressed columns\n   * @param fromBuffer primary buffer to read from\n   * @param order      byte order\n   * @param strategy   compression strategy, for compressed columns\n   * @param fileMapper required for reading version 2 (multi-file) indexed. May be null if you know you are reading\n   *                   a single-file column. Generally, this should only be null in tests, not production code.\n   */\n  public static Supplier<ColumnarFloats> getFloatSupplier(","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/data/CompressionFactory.java#L370-L406","documentation":"CompressionFactory.getLongSerializer accepts only known long encoding strategies (e.g. auto, delta, table, straight). Any other EncodingStrategy value passed in triggers IllegalArgumentException listing the unsupported strategy name. It is a configuration-validation guard on how long columns are compressed.","triggerScenarios":"Calling getLongSerializer with an EncodingStrategy instance outside the handled set, typically from a segment writer configured with an invalid longEncoding value.","commonSituations":"Typo in Druid ingestion spec's columnConfig longEncoding (e.g. \"deltas\" instead of \"delta\"); programmatic use of a custom or deprecated encoding strategy not supported for longs.","solutions":["Fix the longEncoding value in the ingestion spec to a supported strategy: auto, delta, table, or straight","If calling the API directly, pass EncodingStrategy.AUTO or another explicitly supported strategy","Check Druid docs/version for which encoding strategies are valid for long columns in your build"],"exampleFix":"// before\n\"columnConfig\": { \"longEncoding\": \"deltas\" }\n// after\n\"columnConfig\": { \"longEncoding\": \"delta\" }","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"auto\",\"delta\",\"table\",\"straight\");\nif (!allowed.contains(spec.getLongEncoding())) { throw new IllegalArgumentException(\"bad longEncoding\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate ingestion specs against supported longEncoding values before submission","Use EncodingStrategy enum constants, not ad-hoc strings","Consult the docs for your Druid version's supported encodings"],"tags":["java","configuration","compression"],"backgroundTag":"invalid-enum-value","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}