{"record":{"id":"1129a6a98acf6388","repo":"apache/iceberg","slug":"unsupported-compression-strategy","errorCode":null,"errorMessage":"Unsupported compression strategy: ","messagePattern":"Unsupported compression strategy: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"orc/src/main/java/org/apache/iceberg/orc/ORC.java","lineNumber":389,"sourceCode":"            compressionKind,\n            compressionStrategy,\n            dataContext.bloomFilterColumns(),\n            dataContext.bloomFilterFpp());\n      }\n\n      private static CompressionKind toCompressionKind(String codecAsString) {\n        try {\n          return CompressionKind.valueOf(codecAsString.toUpperCase(Locale.ROOT));\n        } catch (IllegalArgumentException e) {\n          throw new IllegalArgumentException(\"Unsupported compression codec: \" + codecAsString);\n        }\n      }\n\n      private static CompressionStrategy toCompressionStrategy(String strategyAsString) {\n        try {\n          return CompressionStrategy.valueOf(strategyAsString.toUpperCase(Locale.ROOT));\n        } catch (IllegalArgumentException e) {\n          throw new IllegalArgumentException(\n              \"Unsupported compression strategy: \" + strategyAsString);\n        }\n      }\n    }\n  }\n\n  public static DataWriteBuilder writeData(OutputFile file) {\n    return new DataWriteBuilder(file);\n  }\n\n  public static DataWriteBuilder writeData(EncryptedOutputFile file) {\n    Preconditions.checkState(\n        !(file instanceof NativeEncryptionOutputFile), \"Native ORC encryption is not supported\");\n    return new DataWriteBuilder(file.encryptingOutputFile());\n  }\n\n  public static class DataWriteBuilder {\n    private final WriteBuilder appenderBuilder;","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/orc/src/main/java/org/apache/iceberg/orc/ORC.java#L371-L407","documentation":"ORC's write builder converts the compression-strategy config into ORC's CompressionStrategy enum via uppercased valueOf. If the string is not a valid CompressionStrategy name (only SPEED or COMPRESSION), IllegalArgumentException is thrown with this message.","triggerScenarios":"Setting the ORC compression strategy property (write.orc.compression-strategy) to anything other than SPEED or COMPRESSION (case-insensitive).","commonSituations":"Typo such as 'fast' or 'balanced'; copying Parquet/other-format strategy names; accidental whitespace in the property value.","solutions":["Set the strategy to exactly SPEED or COMPRESSION (any case)","Remove write.orc.compression-strategy to use the default strategy","Trim the value and avoid extra characters"],"exampleFix":"// before\nprops.set(\"write.orc.compression-strategy\", \"fast\");\n// after\nprops.set(\"write.orc.compression-strategy\", \"SPEED\");","handlingStrategy":"validation","validationCode":"String s = props.getProperty(\"write.orc.compression-strategy\", \"\").toUpperCase(Locale.ROOT).trim();\nif (!s.isEmpty() && !s.equals(\"SPEED\") && !s.equals(\"COMPRESSION\")) {\n  throw new IllegalArgumentException(\"Invalid ORC compression strategy: \" + s);\n}","typeGuard":null,"tryCatchPattern":"try {\n  builder.set(\"write.orc.compression-strategy\", strategy);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"Unsupported compression strategy\")) {\n    log.warn(\"Invalid strategy '{}', using default\", strategy);\n    builder.build();\n  } else throw e;\n}","preventionTips":["Only SPEED and COMPRESSION are valid values for ORC compression strategy","Remove the property entirely to accept the default","Validate user-supplied table properties against the ORC enum before commit"],"tags":["orc","configuration","compression","invalid-enum"],"backgroundTag":"invalid-config-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}