prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
%s
What it means
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.
Source
Thrown at presto-hive/src/main/java/com/facebook/presto/hive/OrcFileWriter.java:185
try {
orcWriter = new OrcWriter(
dataSink,
columnNames,
fileColumnTypes,
fileColumnOrcTypes,
orcEncoding,
compression,
dwrfWriterEncryption,
dwrfEncryptionProvider,
options,
metadata,
hiveStorageTimeZone,
validationInputFactory.isPresent(),
validationMode,
stats);
}
catch (NotSupportedException e) {
throw new PrestoException(NOT_SUPPORTED, e.getMessage(), e);
}
this.rollbackAction = requireNonNull(rollbackAction, "rollbackAction is null");
this.fileInputColumnIndexes = requireNonNull(fileInputColumnIndexes, "outputColumnInputIndexes is null");
ImmutableList.Builder<Block> nullBlocks = ImmutableList.builder();
for (Type fileColumnType : fileColumnTypes) {
BlockBuilder blockBuilder = fileColumnType.createBlockBuilder(null, 1, 0);
blockBuilder.appendNull();
nullBlocks.add(blockBuilder.build());
}
this.nullBlocks = nullBlocks.build();
this.validationInputFactory = validationInputFactory;
}
@Override
public long getWrittenBytes()View on GitHub (pinned to 55bb57d202)
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.
Example fix
// before: unsupported compression requested CREATE TABLE t (...) WITH (format='ORC', orc_compression='UNSUPPORTED_CODEC'); // after: use a supported codec CREATE TABLE t (...) WITH (format='ORC', orc_compression='ZSTD');
Defensive patterns
Strategy: validation
Validate before calling
-- Validate ORC table properties before creating tables SELECT * FROM system.metadata.table_properties WHERE name LIKE 'orc_%'; -- Confirm requested compression/encryption is in the supported set for your Presto version
Type guard
boolean orcOptionsSupported(String compression, boolean dwrfEncryption) {
return Set.of("NONE","SNAPPY","ZLIB","ZSTD","LZ4").contains(compression)
&& (!dwrfEncryption || dwrfEncryptionProviderConfigured);
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/e9e94fe57af1fde3.
Report an issue: GitHub.