{"record":{"id":"e9e94fe57af1fde3","repo":"prestodb/presto","slug":"not-supported-e9e94f","errorCode":"NOT_SUPPORTED","errorMessage":"%s","messagePattern":"%s","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/OrcFileWriter.java","lineNumber":185,"sourceCode":"        try {\n            orcWriter = new OrcWriter(\n                    dataSink,\n                    columnNames,\n                    fileColumnTypes,\n                    fileColumnOrcTypes,\n                    orcEncoding,\n                    compression,\n                    dwrfWriterEncryption,\n                    dwrfEncryptionProvider,\n                    options,\n                    metadata,\n                    hiveStorageTimeZone,\n                    validationInputFactory.isPresent(),\n                    validationMode,\n                    stats);\n        }\n        catch (NotSupportedException e) {\n            throw new PrestoException(NOT_SUPPORTED, e.getMessage(), e);\n        }\n\n        this.rollbackAction = requireNonNull(rollbackAction, \"rollbackAction is null\");\n\n        this.fileInputColumnIndexes = requireNonNull(fileInputColumnIndexes, \"outputColumnInputIndexes is null\");\n\n        ImmutableList.Builder<Block> nullBlocks = ImmutableList.builder();\n        for (Type fileColumnType : fileColumnTypes) {\n            BlockBuilder blockBuilder = fileColumnType.createBlockBuilder(null, 1, 0);\n            blockBuilder.appendNull();\n            nullBlocks.add(blockBuilder.build());\n        }\n        this.nullBlocks = nullBlocks.build();\n        this.validationInputFactory = validationInputFactory;\n    }\n\n    @Override\n    public long getWrittenBytes()","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/OrcFileWriter.java#L167-L203","documentation":"OrcFileWriter's constructor builds an ORC/DWRF OrcWriter for the target file. If the underlying writer construction throws a NotSupportedException (an operation the ORC writer does not support, such as an unsupported compression, encoding, DWRF encryption, or writer feature), Presto rethrows it as a NOT_SUPPORTED PrestoException carrying the original message. The failure occurs before any rows are written.","triggerScenarios":"Creating an ORC/DWRF file writer (new OrcFileWriter) where the OrcWriter constructor throws NotSupportedException — e.g. unsupported compression codec requested via session/table properties, unsupported DWRF writer encryption settings, or an unsupported validation mode/feature combination.","commonSituations":"Session or table properties requesting an ORC feature (compression, encryption, bloom filters, writer type) not supported by the deployed ORC writer; DWRF encryption configured without proper providers; writing to a format with options that changed between Presto versions.","solutions":["Remove or change the unsupported session/table ORC property (compression codec, orc_writer_* settings, DWRF encryption) to a supported value.","Check the exception message (it carries e.getMessage()) to identify the exact unsupported feature and configure a supported alternative.","Downgrade the requested writer options or upgrade Presto to a version supporting the feature.","If DWRF encryption is involved, verify dwrfEncryptionProvider and writer encryption config are correctly set up."],"exampleFix":"// before: unsupported compression requested\nCREATE TABLE t (...) WITH (format='ORC', orc_compression='UNSUPPORTED_CODEC');\n\n// after: use a supported codec\nCREATE TABLE t (...) WITH (format='ORC', orc_compression='ZSTD');","handlingStrategy":"validation","validationCode":"-- Validate ORC table properties before creating tables\nSELECT * FROM system.metadata.table_properties WHERE name LIKE 'orc_%';\n-- Confirm requested compression/encryption is in the supported set for your Presto version","typeGuard":"boolean orcOptionsSupported(String compression, boolean dwrfEncryption) {\n    return Set.of(\"NONE\",\"SNAPPY\",\"ZLIB\",\"ZSTD\",\"LZ4\").contains(compression)\n        && (!dwrfEncryption || dwrfEncryptionProviderConfigured);\n}","tryCatchPattern":null,"preventionTips":["Only set ORC/DWRF session and table properties documented for your Presto version.","Test new writer options (compression, encryption) on a scratch table before production.","Pin writer-related configs in deployment automation to avoid accidental unsupported values."],"tags":["hive","orc","not-supported","writer-config"],"backgroundTag":"unsupported-format","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"}