prestodb/presto · error · PrestoException

ICEBERG_INCOMPATIBLE_VERSION

ICEBERG_INCOMPATIBLE_VERSION

Error message

Cannot read Iceberg manifest files for table format version %d (max supported: %d). Upgrade Presto to read this table.

What it means

PartitionTable.getPartitions checks the table's Iceberg format version before reading manifests; versions above MAX_FORMAT_VERSION_FOR_METADATA_TABLES raise ICEBERG_INCOMPATIBLE_VERSION because this Presto build cannot parse the newer manifest format for the PARTITIONS metadata table.

Source

Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTable.java:180

    @Override
    public RecordCursor cursor(ConnectorTransactionHandle transactionHandle, ConnectorSession session, TupleDomain<Integer> constraint)
    {
        // TODO instead of cursor use pageSource method.
        if (!snapshotId.isPresent()) {
            return new InMemoryRecordSet(resultTypes, ImmutableList.of()).cursor();
        }
        TableScan tableScan = icebergTable.newScan()
                .metricsReporter(new RuntimeStatsMetricsReporter(session.getRuntimeStats()))
                .useSnapshot(snapshotId.get())
                .includeColumnStats();
        return buildRecordCursor(getPartitions(tableScan), icebergTable.spec().fields());
    }

    private Map<StructLikeWrapper, Partition> getPartitions(TableScan tableScan)
    {
        int formatVersion = ((org.apache.iceberg.BaseTable) icebergTable).operations().current().formatVersion();
        if (formatVersion > MAX_FORMAT_VERSION_FOR_METADATA_TABLES) {
            throw new PrestoException(ICEBERG_INCOMPATIBLE_VERSION,
                    format("Cannot read Iceberg manifest files for table format version %d (max supported: %d). Upgrade Presto to read this table.",
                            formatVersion, MAX_FORMAT_VERSION_FOR_METADATA_TABLES));
        }

        try (CloseableIterable<FileScanTask> fileScanTasks = tableScan.planFiles()) {
            Map<StructLikeWrapper, Partition> partitions = new HashMap<>();

            for (FileScanTask fileScanTask : fileScanTasks) {
                DataFile dataFile = fileScanTask.file();
                Types.StructType structType = fileScanTask.spec().partitionType();
                StructLike partitionStruct = dataFile.partition();
                StructLikeWrapper partitionWrapper = StructLikeWrapper.forType(structType).set(partitionStruct);

                if (!partitions.containsKey(partitionWrapper)) {
                    Partition partition = new Partition(
                            idToTypeMapping,
                            nonPartitionPrimitiveColumns,
                            partitionStruct,

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Upgrade Presto to a release supporting the table's format version
  2. Downgrade/rewrite the table to a supported format version if feasible
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTable.java:180 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/c9848f3dc7a8c32b. Report an issue: GitHub.