{"record":{"id":"f6f5a7ffc3083b4a","repo":"prestodb/presto","slug":"parquet-io-read-error-f6f5a7","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/TimestampFlatBatchReader.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(timezone);\n            }\n            else {\n                columnChunk = readWithNull(timezone);\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/TimestampFlatBatchReader.java#L91-L127","documentation":"TimestampFlatBatchReader.readNext wraps IOExceptions thrown while reading an INT64 TIMESTAMP column chunk (seek, page fetch, dictionary page) into a PrestoException with code PARQUET_IO_READ_ERROR, adding the column descriptor to the message and preserving the IOException as cause. It indicates the storage layer failed to deliver the column's pages, as opposed to the data being malformed.","triggerScenarios":"readNext(timezone) on a TIMESTAMP column when pageReader.seek()/readPage()/readDictionaryPage() throws IOException — e.g. S3 read timeouts, HDFS block unavailability, or the file disappearing mid-scan.","commonSituations":"Long-running scans hitting S3 throttling or credential expiry, HDFS node maintenance during a query, files overwritten/compacted while being read, network flaps between workers and storage, quota/permission revocations.","solutions":["Inspect the cause IOException to pinpoint the storage failure mode.","Retry the query or split; enable connector retry for transient I/O errors.","Confirm the file exists and is readable by the worker service account.","Check storage health/throttling metrics and raise timeouts or limits if needed.","Restore the file or point the table at a healthy replica if the failure is persistent."],"exampleFix":"// before\nColumnChunk chunk = reader.readNext(timezone); // PARQUET_IO_READ_ERROR\n\n// after\ntry {\n    return reader.readNext(timezone);\n}\ncatch (PrestoException e) {\n    if (e.getErrorCode() == PARQUET_IO_READ_ERROR.toErrorCode() && attempt++ < maxRetries) {\n        return readerWithFreshStream().readNext(timezone);\n    }\n    throw e;\n}","handlingStrategy":"retry","validationCode":"if (!fs.exists(path) || fs.getFileStatus(path).getLen() == 0) {\n    throw new IOException(\"Timestamp column file missing/empty: \" + 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()) && attemptsLeft()) {\n        closeQuietly(input); reopen(input);\n        return reader.readNext(timezone);\n    }\n    throw e;\n}","preventionTips":["Enable idempotent split retries (fault-tolerant execution) for scan-heavy workloads.","Use short-lived-credential renewal or instance roles to avoid mid-scan auth failures.","Freeze/compact table files before long-running analytical queries read them.","Set generous storage-client timeouts and socket buffers for large page reads."],"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"}