{"record":{"id":"a82fe85b7005eaed","repo":"prestodb/presto","slug":"iceberg-cannot-open-split","errorCode":"ICEBERG_CANNOT_OPEN_SPLIT","errorMessage":"Error opening Iceberg split %s (offset=%s, length=%s): %s","messagePattern":"Error opening Iceberg split (.+?) \\(offset=(.+?), length=(.+?)\\): (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSourceProvider.java","lineNumber":445,"sourceCode":"                if (dataSource != null) {\n                    dataSource.close();\n                }\n            }\n            catch (IOException ignored) {\n            }\n            if (e instanceof PrestoException) {\n                throw (PrestoException) e;\n            }\n            String message = format(\"Error opening Iceberg split %s (offset=%s, length=%s): %s\", path, start, length, e.getMessage());\n\n            if (e instanceof ParquetCorruptionException) {\n                throw new PrestoException(ICEBERG_BAD_DATA, message, e);\n            }\n\n            if (e instanceof BlockMissingException) {\n                throw new PrestoException(ICEBERG_MISSING_DATA, message, e);\n            }\n            throw new PrestoException(ICEBERG_CANNOT_OPEN_SPLIT, message, e);\n        }\n    }\n\n    public static Optional<org.apache.parquet.schema.Type> getColumnType(\n            Map<Integer, org.apache.parquet.schema.Type> parquetIdToField,\n            MessageType messageType,\n            IcebergColumnHandle column)\n    {\n        if (isPushedDownSubfield(column)) {\n            Subfield pushedDownSubfield = getPushedDownSubfield(column);\n            List<String> encodedPath = nestedColumnPath(pushedDownSubfield).stream()\n                    .map(AvroSchemaUtil::makeCompatibleName)\n                    .collect(Collectors.toList());\n            return getSubfieldType(messageType, AvroSchemaUtil.makeCompatibleName(pushedDownSubfield.getRootName()), encodedPath);\n        }\n\n        if (parquetIdToField.isEmpty()) {\n            // This is a migrated table","sourceCodeStart":427,"sourceCodeEnd":463,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSourceProvider.java#L427-L463","documentation":"The fallback branch of the same error-handling block in IcebergPageSourceProvider.createParquetPageSource: any exception opening the Iceberg split that is neither a PrestoException, ParquetCorruptionException, nor BlockMissingException is rethrown as PrestoException with code ICEBERG_CANNOT_OPEN_SPLIT. It wraps the message 'Error opening Iceberg split ... (offset, length)' and the original cause. It indicates the connector could not open/access the file at all — I/O errors, permission issues, missing files other than HDFS BlockMissingException, etc.","triggerScenarios":"createDataPageSource -> createParquetPageSource catching a raw IOException/RuntimeException from the file system or HdfsInput while opening the split's Parquet file — e.g. FileNotFoundException (object deleted from S3), permission denied, throttling/timeout errors from object store, or network I/O failure.","commonSituations":"Files deleted by snapshot expiry/orphan cleanup while a long-running query was executing; wrong S3/HDFS credentials or bucket config; S3 503/timeout throttling; file moved by external processes; transient network partitions between Presto workers and storage.","solutions":["Read the wrapped cause (e) in the error message/stack trace to identify the root problem (missing file, permissions, timeout).","If files were deleted concurrently (expireSnapshots/orphan cleanup), increase retention, prevent deletion during queries, and re-run; consider using Iceberg time travel/rollback to a valid snapshot.","Fix storage access: verify credentials, IAM/HDFS permissions, bucket/container names, and network connectivity between workers and storage.","For transient object-store throttling/timeouts, retry the query and tune S3 client settings (retries, connection pool, timeout) in the iceberg connector properties."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Check file existence/permissions before querying\n// aws s3 ls s3a-bucket/table/data/  (or hdfs dfs -ls /warehouse/db/table)\n// Validate connector storage config: iceberg.s3.path-style-access, credentials, region","typeGuard":null,"tryCatchPattern":"try {\n    queryResults = execute(\"SELECT * FROM iceberg_table\");\n} catch (PrestoException e) {\n    if (\"ICEBERG_CANNOT_OPEN_SPLIT\".equals(e.getErrorCode().getName())) {\n        // inspect wrapped cause: FileNotFoundException -> snapshot expiry;\n        // permission/timeout -> fix storage access; transient -> retry with backoff\n        diagnoseCause(e.getCause());\n    } else {\n        throw e;\n    }\n}","preventionTips":["Confirm table location/credentials/bucket config before running queries.","Do not run expire_snapshots or orphan-file cleanup concurrently with long queries.","Tune S3 client retry/timeout settings for object-store throttling.","Check filesystem permissions for the Presto service account."],"tags":["iceberg","io","split-open-failure","storage","read-path"],"backgroundTag":"iceberg-split-open-failure","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"}