{"record":{"id":"f3fa54ef29165298","repo":"prestodb/presto","slug":"iceberg-incompatible-version","errorCode":"ICEBERG_INCOMPATIBLE_VERSION","errorMessage":"Cannot read Iceberg manifest files for table format version %d (max supported: %d). Upgrade Presto to read this table.","messagePattern":"Cannot read Iceberg manifest files for table format version (.+?) \\(max supported: (.+?)\\)\\. Upgrade Presto to read this table\\.","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java","lineNumber":140,"sourceCode":"    }\n\n    @Override\n    public ConnectorPageSource pageSource(ConnectorTransactionHandle transactionHandle, ConnectorSession session, TupleDomain<Integer> constraint)\n    {\n        return new FixedPageSource(buildPages(tableMetadata, icebergTable, snapshotId, session));\n    }\n\n    private static List<Page> buildPages(ConnectorTableMetadata tableMetadata, Table icebergTable, Optional<Long> snapshotId, ConnectorSession session)\n    {\n        PageListBuilder pagesBuilder = forTable(tableMetadata);\n        RuntimeStats runtimeStats = session.getRuntimeStats();\n        TableScan tableScan = getTableScan(TupleDomain.all(), snapshotId, icebergTable, runtimeStats).includeColumnStats();\n        Map<Integer, Type> idToTypeMap = getIdToTypeMap(icebergTable.schema());\n\n        // Validate table format version - manifest file reading not supported for v3+\n        int formatVersion = opsFromTable(icebergTable).current().formatVersion();\n        if (formatVersion > MAX_FORMAT_VERSION_FOR_METADATA_TABLES) {\n            throw new PrestoException(ICEBERG_INCOMPATIBLE_VERSION,\n                    format(\"Cannot read Iceberg manifest files for table format version %d (max supported: %d). Upgrade Presto to read this table.\",\n                            formatVersion, MAX_FORMAT_VERSION_FOR_METADATA_TABLES));\n        }\n\n        int fileCount = 0;\n        int manifestCount = 0;\n        if (icebergTable.currentSnapshot() != null) {\n            manifestCount = icebergTable.currentSnapshot().allManifests(icebergTable.io()).size();\n        }\n\n        try (CloseableIterable<FileScanTask> fileScanTasks = tableScan.planFiles()) {\n            for (FileScanTask fileScanTask : fileScanTasks) {\n                DataFile dataFile = fileScanTask.file();\n                fileCount++;\n                pagesBuilder.beginRow();\n                pagesBuilder.appendInteger(dataFile.content().id());\n                pagesBuilder.appendVarchar(dataFile.path().toString());\n                pagesBuilder.appendVarchar(dataFile.format().name());","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java#L122-L158","documentation":"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.","triggerScenarios":"Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/FilesTable.java:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upgrade Presto to a version supporting the table's Iceberg format version","If acceptable, rewrite/downgrade the table to a supported format version (e.g. via rewrite_manifests / table migration tooling)"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}