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

  1. Inspect the cause (getCause()) to identify the underlying I/O error and address it
  2. Retry the query for transient storage errors
  3. Validate file integrity; regenerate truncated/corrupt files
  4. 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

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


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