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

FilesTable.buildPages checks the table's Iceberg format version before reading manifest files; if it exceeds MAX_FORMAT_VERSION_FOR_METADATA_TABLES the connector raises ICEBERG_INCOMPATIBLE_VERSION because the manifest layout of that newer spec cannot be parsed by this build.

Source

Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java:140

    }

    @Override
    public ConnectorPageSource pageSource(ConnectorTransactionHandle transactionHandle, ConnectorSession session, TupleDomain<Integer> constraint)
    {
        return new FixedPageSource(buildPages(tableMetadata, icebergTable, snapshotId, session));
    }

    private static List<Page> buildPages(ConnectorTableMetadata tableMetadata, Table icebergTable, Optional<Long> snapshotId, ConnectorSession session)
    {
        PageListBuilder pagesBuilder = forTable(tableMetadata);
        RuntimeStats runtimeStats = session.getRuntimeStats();
        TableScan tableScan = getTableScan(TupleDomain.all(), snapshotId, icebergTable, runtimeStats).includeColumnStats();
        Map<Integer, Type> idToTypeMap = getIdToTypeMap(icebergTable.schema());

        // Validate table format version - manifest file reading not supported for v3+
        int formatVersion = opsFromTable(icebergTable).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));
        }

        int fileCount = 0;
        int manifestCount = 0;
        if (icebergTable.currentSnapshot() != null) {
            manifestCount = icebergTable.currentSnapshot().allManifests(icebergTable.io()).size();
        }

        try (CloseableIterable<FileScanTask> fileScanTasks = tableScan.planFiles()) {
            for (FileScanTask fileScanTask : fileScanTasks) {
                DataFile dataFile = fileScanTask.file();
                fileCount++;
                pagesBuilder.beginRow();
                pagesBuilder.appendInteger(dataFile.content().id());
                pagesBuilder.appendVarchar(dataFile.path().toString());
                pagesBuilder.appendVarchar(dataFile.format().name());

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Upgrade Presto to a version supporting the table's Iceberg format version
  2. If acceptable, rewrite/downgrade the table to a supported format version (e.g. via rewrite_manifests / table migration tooling)
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java:140 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/f3fa54ef29165298. Report an issue: GitHub.