prestodb/presto · error · PrestoException

PARQUET_IO_READ_ERROR

PARQUET_IO_READ_ERROR

Error message

Error reading Parquet column 

What it means

Int32FlatBatchReader.readNext wraps any IOException raised while decoding pages (page reading, definition-level or value decoding) into a PrestoException with code PARQUET_IO_READ_ERROR, adding the column descriptor for context. It signals an I/O or decoding failure while reading a specific Parquet column, not a data-value problem.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/Int32FlatBatchReader.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

  1. Inspect the cause chain (getCause()) to find the real I/O problem and fix the storage/network issue
  2. Retry the query — transient HDFS/S3 errors are the most common cause
  3. Verify the file is not truncated or corrupt (parquet-tools / table regeneration)
  4. Check compression codec support; upgrade Presto if the file uses a newer codec (e.g. newer ZSTD)

Example fix

// before: confusing wrapped error
throw new PrestoException(PARQUET_IO_READ_ERROR, "Error reading Parquet column " + columnDescriptor, e);
// after: log the cause for diagnosis
log.error(e.getCause(), "Underlying failure reading %s", columnDescriptor);
throw new PrestoException(PARQUET_IO_READ_ERROR, "Error reading Parquet column " + columnDescriptor, e);
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check object accessibility
FileStatus st = fs.getFileStatus(path);
if (!fs.open(path).read() ... /* or check length > 0 and footer readable */)

Try / catch

try {
    reader.readNext();
} catch (PrestoException e) {
    if (e.getErrorCode() == PARQUET_IO_READ_ERROR) {
        retryWithBackoff();
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: Any IOException thrown from pageReader.readPage(), readFlatPage, or the underlying value/definition decoders during readNext of an int32 column chunk — e.g. failure decompressing a page, reading from a broken HDFS/S3 stream, or a decoder error surfaced as IOException.

Common situations: Network interruption while streaming a Parquet file from S3/HDFS; checksum failures on a block; unsupported compression codec or corrupted page that the underlying reader reports as an I/O failure.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/df62bcc010905e9f. Report an issue: GitHub.