prestodb/presto · error · PrestoException
PARQUET_IO_READ_ERROR
PARQUET_IO_READ_ERROR
Error message
Error reading Parquet column
What it means
Int64FlatBatchReader.readNext wraps any IOException raised while reading or decoding pages of an int64 column chunk into a PrestoException with code PARQUET_IO_READ_ERROR, including the column descriptor. It indicates an I/O or underlying-decoder failure, not a logic error in the caller.
Source
Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/Int64FlatBatchReader.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 cause (getCause()) to identify the underlying I/O error and address it
- Retry the query for transient storage errors
- Validate file integrity; regenerate truncated/corrupt files
- Check codec support; upgrade Presto if the file uses an unsupported/newer compression codec
Example fix
// before
chunk = reader.readNext(); // wrapped error loses context
// after
try {
chunk = reader.readNext();
} catch (PrestoException e) {
log.error(e.getCause(), "failed reading %s", column);
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
// ensure the stream is readable before decoding
try (InputStream in = fs.open(path)) {
if (in.read() == -1) throw new IOException("empty file");
} Try / catch
try {
reader.readNext();
} catch (PrestoException e) {
if (PARQUET_IO_READ_ERROR.equals(e.getErrorCode().getName())) {
retryQueryWithBackoff();
} else throw e;
} Prevention
- Retry transient IO errors with exponential backoff
- Monitor storage health (HDFS datanode errors, S3 5xx)
- Validate file footers before splits are scheduled
- Upgrade Presto for codec/decoder fixes
When it happens
Trigger: IOException from pageReader.readPage(), readFlatPage, or the int64 value/definition decoders during readNext — e.g. decompression failure, broken stream from HDFS/S3, checksum mismatch.
Common situations: Transient storage/network failures streaming Parquet from S3 or HDFS; corrupted or truncated pages; unsupported compression codec in the file.
Related errors
- PARQUET_IO_READ_ERROR
- DRUID_DEEP_STORAGE_ERROR
- HIVE_FILESYSTEM_ERROR
- HIVE_FILESYSTEM_ERROR
- HIVE_FILE_NOT_FOUND
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/607e3482a4855029.
Report an issue: GitHub.