prestodb/presto · error · PrestoException
PARQUET_IO_READ_ERROR
PARQUET_IO_READ_ERROR
Error message
Error reading Parquet column
What it means
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.
Source
Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/LongDecimalFlatBatchReader.java:109
readOffset = readOffset + nextBatchSize;
nextBatchSize = batchSize;
}
@Override
public ColumnChunk readNext(Optional<DateTimeZone> timezone)
{
ColumnChunk columnChunk = null;
try {
seek();
if (field.isRequired()) {
columnChunk = readWithoutNull();
}
else {
columnChunk = readWithNull();
}
}
catch (IOException exception) {
throw new PrestoException(PARQUET_IO_READ_ERROR, "Error reading Parquet column " + columnDescriptor, exception);
}
readOffset = 0;
nextBatchSize = 0;
return columnChunk;
}
@Override
public long getRetainedSizeInBytes()
{
return INSTANCE_SIZE +
(definitionLevelDecoder == null ? 0 : definitionLevelDecoder.getRetainedSizeInBytes()) +
(valuesDecoder == null ? 0 : valuesDecoder.getRetainedSizeInBytes()) +
(dictionary == null ? 0 : dictionary.getRetainedSizeInBytes()) +
(pageReader == null ? 0 : pageReader.getRetainedSizeInBytes());
}
protected boolean readNextPage()View on GitHub (pinned to 55bb57d202)
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.
Example fix
// before: hard failure on transient I/O
ColumnChunk chunk = reader.readNext(timezone);
// after: retry transient I/O at the connector level
for (int attempt = 0; attempt < 3; attempt++) {
try { return reader.readNext(timezone); }
catch (PrestoException e) {
if (e.getErrorCode() != PARQUET_IO_READ_ERROR.toErrorCode() || attempt == 2) throw e;
sleep(backoff(attempt));
}
} Defensive patterns
Strategy: retry
Validate before calling
if (!fs.exists(path) || !fs.canRead(path)) {
throw new IOException("File missing or unreadable before scan: " + path);
} Try / catch
try {
return reader.readNext(timezone);
} catch (PrestoException e) {
if (PARQUET_IO_READ_ERROR.toErrorCode().equals(e.getErrorCode()) && isRetryable(e.getCause())) {
return retryWithBackoff(() -> reopenAndRead(), 3);
}
throw e;
} Prevention
- 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).
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- PARQUET_IO_READ_ERROR
- PARQUET_IO_READ_ERROR
- PARQUET_IO_READ_ERROR
- PARQUET_IO_READ_ERROR
- HUDI_CANNOT_OPEN_SPLIT
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/d6bd100e8782044d.
Report an issue: GitHub.