{"record":{"id":"2187b8bc2c858978","repo":"prestodb/presto","slug":"generic-internal-error-2187b8","errorCode":"GENERIC_INTERNAL_ERROR","errorMessage":"Unknown compression algorithm ${compression} for column ${name}","messagePattern":"Unknown compression algorithm (.+?) for column (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-kudu/src/main/java/com/facebook/presto/kudu/KuduClientSession.java","lineNumber":418,"sourceCode":"    {\n        if (columnMetadata.getType() instanceof DecimalType) {\n            DecimalType type = (DecimalType) columnMetadata.getType();\n            ColumnTypeAttributes attributes = new ColumnTypeAttributes.ColumnTypeAttributesBuilder()\n                    .precision(type.getPrecision())\n                    .scale(type.getScale()).build();\n            builder.typeAttributes(attributes);\n        }\n    }\n\n    private void setCompression(String name, ColumnSchema.ColumnSchemaBuilder builder, ColumnDesign design)\n    {\n        if (design.getCompression() != null) {\n            try {\n                ColumnSchema.CompressionAlgorithm algorithm = KuduTableProperties.lookupCompression(design.getCompression());\n                builder.compressionAlgorithm(algorithm);\n            }\n            catch (IllegalArgumentException e) {\n                throw new PrestoException(GENERIC_INTERNAL_ERROR, \"Unknown compression algorithm \" + design.getCompression() + \" for column \" + name);\n            }\n        }\n    }\n\n    private void setEncoding(String name, ColumnSchema.ColumnSchemaBuilder builder, ColumnDesign design)\n    {\n        if (design.getEncoding() != null) {\n            try {\n                ColumnSchema.Encoding encoding = KuduTableProperties.lookupEncoding(design.getEncoding());\n                builder.encoding(encoding);\n            }\n            catch (IllegalArgumentException e) {\n                throw new PrestoException(GENERIC_INTERNAL_ERROR, \"Unknown encoding \" + design.getEncoding() + \" for column \" + name);\n            }\n        }\n    }\n\n    private CreateTableOptions buildCreateTableOptions(Schema schema, Map<String, Object> properties)","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-kudu/src/main/java/com/facebook/presto/kudu/KuduClientSession.java#L400-L436","documentation":"When building a column schema (e.g. during CREATE TABLE), KuduClientSession.setCompression maps the table property-specified compression name to Kudu's ColumnSchema.CompressionAlgorithm. If KuduTableProperties.lookupCompression cannot resolve the name, it throws IllegalArgumentException, converted here to a PrestoException with GENERIC_INTERNAL_ERROR.","triggerScenarios":"CREATE TABLE with a column compression property value Kudu does not recognize (e.g. 'brotli', 'zstd' on a Kudu version lacking it, or a typo like 'snappy2').","commonSituations":"Copying compression settings from other engines; Kudu version differences in supported algorithms; typos in compression property.","solutions":["Use a supported compression name: lz4, snappy, or zlib (check KuduTableProperties.lookupCompression)","Upgrade the Kudu client/server if the desired algorithm requires a newer version","Remove the compression property to use Kudu defaults"],"exampleFix":"// before\ncompression = 'zstd'\n// after\ncompression = 'lz4'","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"lz4\",\"snappy\",\"zlib\");\nif (compression != null && !allowed.contains(compression.toLowerCase(Locale.ENGLISH))) {\n    throw new IllegalArgumentException(\"Unsupported compression: \" + compression);\n}","typeGuard":null,"tryCatchPattern":"try {\n    createTable(...);\n} catch (PrestoException e) {\n    if (e.getMessage().contains(\"Unknown compression algorithm\")) {\n        throw new IllegalArgumentException(\"Use lz4, snappy, or zlib: \" + e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Only offer compression options from KuduTableProperties.lookupCompression's supported names","Test CREATE TABLE DDL in a staging catalog first","Do not copy compression names from Parquet/ORC configs"],"tags":["kudu","ddl","compression"],"backgroundTag":"invalid-enum-value","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}