prestodb/presto · error · PrestoException

PARQUET_IO_READ_ERROR

PARQUET_IO_READ_ERROR

Error message

Error reading Parquet column 

What it means

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.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/TimestampFlatBatchReader.java:109

        readOffset = readOffset + nextBatchSize;
        nextBatchSize = batchSize;
    }

    @Override
    public ColumnChunk readNext(Optional<DateTimeZone> timezone)
    {
        ColumnChunk columnChunk = null;
        try {
            seek();
            if (field.isRequired()) {
                columnChunk = readWithoutNull(timezone);
            }
            else {
                columnChunk = readWithNull(timezone);
            }
        }
        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 IOException to pinpoint the storage failure mode.
  2. Retry the query or split; enable connector retry for transient I/O errors.
  3. Confirm the file exists and is readable by the worker service account.
  4. Check storage health/throttling metrics and raise timeouts or limits if needed.
  5. Restore the file or point the table at a healthy replica if the failure is persistent.

Example fix

// before
ColumnChunk chunk = reader.readNext(timezone); // PARQUET_IO_READ_ERROR

// after
try {
    return reader.readNext(timezone);
}
catch (PrestoException e) {
    if (e.getErrorCode() == PARQUET_IO_READ_ERROR.toErrorCode() && attempt++ < maxRetries) {
        return readerWithFreshStream().readNext(timezone);
    }
    throw e;
}
Defensive patterns

Strategy: retry

Validate before calling

if (!fs.exists(path) || fs.getFileStatus(path).getLen() == 0) {
    throw new IOException("Timestamp column file missing/empty: " + path);
}

Try / catch

try {
    return reader.readNext(timezone);
} catch (PrestoException e) {
    if (PARQUET_IO_READ_ERROR.toErrorCode().equals(e.getErrorCode()) && attemptsLeft()) {
        closeQuietly(input); reopen(input);
        return reader.readNext(timezone);
    }
    throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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