prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

NOT_SUPPORTED (message from NotSupportedException)

What it means

TempFileWriter.createOrcFileWriter builds an ORC writer for spilled temporary data using the aircompressor/encoder stack, which can throw org.apache.parquet/aircompressor NotSupportedException for unsupported compression codecs. The code converts it to a PrestoException with NOT_SUPPORTED so the failure is reported as a configuration/capability problem rather than an internal error.

Source

Thrown at presto-hive/src/main/java/com/facebook/presto/hive/util/TempFileWriter.java:106

                    ORC,
                    LZ4,
                    Optional.empty(),
                    NO_ENCRYPTION,
                    OrcWriterOptions.builder()
                            .withMaxStringStatisticsLimit(new DataSize(0, BYTE))
                            .withFlushPolicy(DefaultOrcWriterFlushPolicy.builder()
                                    .withStripeMinSize(new DataSize(64, MEGABYTE))
                                    .build())
                            .withDictionaryMaxMemory(new DataSize(1, MEGABYTE))
                            .build(),
                    ImmutableMap.of(),
                    UTC,
                    false,
                    OrcWriteValidationMode.BOTH,
                    NOOP_WRITER_STATS);
        }
        catch (NotSupportedException e) {
            throw new PrestoException(NOT_SUPPORTED, e.getMessage(), e);
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set hive.compression-codec to a supported value (GZIP, SNAPPY, or ZSTD if your version supports it) in the Hive catalog properties.
  2. Check the exact NotSupportedException message for the unsupported codec/feature name.
  3. Upgrade Presto if the desired codec is supported in a newer release.
  4. For temp/spill files, consider keeping the default compression since temp data is short-lived.

Example fix

// before (hive.properties)
hive.compression-codec=LZ4
// after
hive.compression-codec=ZSTD
Defensive patterns

Strategy: validation

Validate before calling

Set<String> supported = Set.of("GZIP", "SNAPPY", "ZSTD");
if (!supported.contains(compressionCodec.toUpperCase())) {
    throw new IllegalArgumentException("unsupported codec for ORC temp writer: " + compressionCodec);
}

Try / catch

try {
    writer = TempFileWriter.createOrcFileWriter(...);
} catch (PrestoException e) {
    if (e.getErrorCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode()) {
        // fall back to default compression
    }
}

Prevention

When it happens

Trigger: Creating an ORC temp file writer with a HiveWriterFactory compression codec the ORC writer implementation does not support — e.g. hive.compression-codec set to a codec (LZ4, ZSTD on older builds) not compiled in for this writer path.

Common situations: Cluster configured with an exotic compression codec while the spill path only supports GZIP/SNAPPY/ZSTD depending on version; upgrading Presto changes the supported codec set; copy-pasted codec name typo in catalog properties.

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/cddc41d185dca936. Report an issue: GitHub.