prestodb/presto · error · PrestoException

PARQUET_IO_READ_ERROR

PARQUET_IO_READ_ERROR

Error message

Error reading Parquet column 

What it means

ShortDecimalFlatBatchReader.readNext wraps IOExceptions raised while reading a DECIMAL column that fits in a primitive INT64 (precision <= 18) into a PrestoException with code PARQUET_IO_READ_ERROR, rethrowing with the column descriptor in the message and the original IOException as cause. It marks an underlying storage/I-O failure (page fetch, seek, or dictionary read) rather than a decoding/corruption issue.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/ShortDecimalFlatBatchReader.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. Read the caused-by chain to find the exact storage error (timeout, NoSuchKey, permission).
  2. Retry the query/split; configure connector-level retries for transient errors.
  3. Verify file existence and read permissions for the Presto worker's service account.
  4. Check storage backend health and rate limits (HDFS reports, S3 CloudWatch metrics).
  5. Restore or relocate the data if the file is permanently inaccessible.

Example fix

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

// after: handle at task level with retry
try {
    return reader.readNext(timezone);
}
catch (PrestoException e) {
    if (isTransientIo(e.getCause())) return retryRead(reader, timezone);
    throw e;
}
Defensive patterns

Strategy: retry

Validate before calling

if (!fileSystem.exists(path)) {
    throw new IOException("Short-decimal column source file missing: " + path);
}

Try / catch

try {
    return reader.readNext(timezone);
} catch (PrestoException e) {
    if (PARQUET_IO_READ_ERROR.toErrorCode().equals(e.getErrorCode())) {
        Throwable cause = e.getCause();
        if (cause instanceof IOException && isTransient(cause)) return retryRead();
    }
    throw e;
}

Prevention

When it happens

Trigger: readNext() on a SHORT DECIMAL column when seek()/pageReader.readPage()/readDictionaryPage() throws IOException — unavailable storage block, timed-out S3 GET, file moved/deleted during scan, or closed input stream.

Common situations: S3 request throttling or expired session credentials mid-query, HDFS DataNode failures, storage-side eviction of files between query planning and execution, network timeouts on long scans, running out of open-file handles on workers.

Related errors


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