{"record":{"id":"d6bd100e8782044d","repo":"prestodb/presto","slug":"parquet-io-read-error-d6bd10","errorCode":"PARQUET_IO_READ_ERROR","errorMessage":"Error reading Parquet column ","messagePattern":"Error reading Parquet column ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/LongDecimalFlatBatchReader.java","lineNumber":109,"sourceCode":"        readOffset = readOffset + nextBatchSize;\n        nextBatchSize = batchSize;\n    }\n\n    @Override\n    public ColumnChunk readNext(Optional<DateTimeZone> timezone)\n    {\n        ColumnChunk columnChunk = null;\n        try {\n            seek();\n            if (field.isRequired()) {\n                columnChunk = readWithoutNull();\n            }\n            else {\n                columnChunk = readWithNull();\n            }\n        }\n        catch (IOException exception) {\n            throw new PrestoException(PARQUET_IO_READ_ERROR, \"Error reading Parquet column \" + columnDescriptor, exception);\n        }\n\n        readOffset = 0;\n        nextBatchSize = 0;\n        return columnChunk;\n    }\n\n    @Override\n    public long getRetainedSizeInBytes()\n    {\n        return INSTANCE_SIZE +\n                (definitionLevelDecoder == null ? 0 : definitionLevelDecoder.getRetainedSizeInBytes()) +\n                (valuesDecoder == null ? 0 : valuesDecoder.getRetainedSizeInBytes()) +\n                (dictionary == null ? 0 : dictionary.getRetainedSizeInBytes()) +\n                (pageReader == null ? 0 : pageReader.getRetainedSizeInBytes());\n    }\n\n    protected boolean readNextPage()","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/LongDecimalFlatBatchReader.java#L91-L127","documentation":"LongDecimalFlatBatchReader.readNext wraps any IOException raised while reading a fixed_len_byte_array(16) DECIMAL column chunk (seek, page reads, dictionary page reads) into a PrestoException with code PARQUET_IO_READ_ERROR. It signals that the underlying I/O layer (HDFS, S3, local FS) failed while fetching pages for the decimal column; the original IOException is attached as the cause. This is the reader's generic I/O failure boundary, distinct from decoding-corruption errors.","triggerScenarios":"readNext() on a DECIMAL(38,x) column when the underlying PageReader/seek()/readPage()/readDictionaryPage() throws IOException — e.g. the HDFS block is unavailable, the S3 object read times out, or the file was deleted/renamed mid-scan.","commonSituations":"S3 throttling (503 SlowDown) or expired credentials during a long scan, HDFS DataNode unavailability or block re-replication, files removed by a retention job while a query is running, network partitions between coordinator and storage, or permission changes on the file.","solutions":["Inspect the caused-by IOException to identify the storage layer failure (timeout, missing block, permission).","Retry the query — transient S3/HDFS failures often resolve; enable Presto/Hive connector retry settings for splits.","Verify the file still exists and is readable by the Presto worker user (permissions, hdfs dfs -test, aws s3 head-object).","Check storage health: DataNode status in HDFS, S3 service status/throttling limits.","If failures are persistent, restore the file from backup or re-register the table location."],"exampleFix":"// before: hard failure on transient I/O\nColumnChunk chunk = reader.readNext(timezone);\n\n// after: retry transient I/O at the connector level\nfor (int attempt = 0; attempt < 3; attempt++) {\n    try { return reader.readNext(timezone); }\n    catch (PrestoException e) {\n        if (e.getErrorCode() != PARQUET_IO_READ_ERROR.toErrorCode() || attempt == 2) throw e;\n        sleep(backoff(attempt));\n    }\n}","handlingStrategy":"retry","validationCode":"if (!fs.exists(path) || !fs.canRead(path)) {\n    throw new IOException(\"File missing or unreadable before scan: \" + path);\n}","typeGuard":null,"tryCatchPattern":"try {\n    return reader.readNext(timezone);\n} catch (PrestoException e) {\n    if (PARQUET_IO_READ_ERROR.toErrorCode().equals(e.getErrorCode()) && isRetryable(e.getCause())) {\n        return retryWithBackoff(() -> reopenAndRead(), 3);\n    }\n    throw e;\n}","preventionTips":["Enable Presto/Hive connector split retry and fault-tolerant execution for transient I/O.","Keep storage credentials refreshed (instance profiles, token renewal) for long scans.","Monitor S3 throttling and HDFS DataNode health; size request rates accordingly.","Never delete or overwrite table files while queries may be reading them (use atomic rename/commit)."],"tags":["parquet","io","presto-exception","storage"],"backgroundTag":"parquet-io-read-error","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"}