{"record":{"id":"264c80f6b3afb7cb","repo":"prestodb/presto","slug":"parquet-io-read-error-264c80","errorCode":"PARQUET_IO_READ_ERROR","errorMessage":"Error reading Parquet column ","messagePattern":"Error reading Parquet column ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/ShortDecimalFlatBatchReader.java","lineNumber":109,"sourceCode":"        readOffset = readOffset + nextBatchSize;\n        nextBatchSize = batchSize;\n    }\n\n    @Override\n    public ColumnChunk readNext(Optional<DateTimeZone> timezone)\n    {\n        ColumnChunk columnChunk = null;\n        try {\n            seek();\n            if (field.isRequired()) {\n                columnChunk = readWithoutNull();\n            }\n            else {\n                columnChunk = readWithNull();\n            }\n        }\n        catch (IOException exception) {\n            throw new PrestoException(PARQUET_IO_READ_ERROR, \"Error reading Parquet column \" + columnDescriptor, exception);\n        }\n\n        readOffset = 0;\n        nextBatchSize = 0;\n        return columnChunk;\n    }\n\n    @Override\n    public long getRetainedSizeInBytes()\n    {\n        return INSTANCE_SIZE +\n                (definitionLevelDecoder == null ? 0 : definitionLevelDecoder.getRetainedSizeInBytes()) +\n                (valuesDecoder == null ? 0 : valuesDecoder.getRetainedSizeInBytes()) +\n                (dictionary == null ? 0 : dictionary.getRetainedSizeInBytes()) +\n                (pageReader == null ? 0 : pageReader.getRetainedSizeInBytes());\n    }\n\n    protected boolean readNextPage()","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/ShortDecimalFlatBatchReader.java#L91-L127","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the caused-by chain to find the exact storage error (timeout, NoSuchKey, permission).","Retry the query/split; configure connector-level retries for transient errors.","Verify file existence and read permissions for the Presto worker's service account.","Check storage backend health and rate limits (HDFS reports, S3 CloudWatch metrics).","Restore or relocate the data if the file is permanently inaccessible."],"exampleFix":"// before\nColumnChunk chunk = reader.readNext(timezone); // PrestoException PARQUET_IO_READ_ERROR\n\n// after: handle at task level with retry\ntry {\n    return reader.readNext(timezone);\n}\ncatch (PrestoException e) {\n    if (isTransientIo(e.getCause())) return retryRead(reader, timezone);\n    throw e;\n}","handlingStrategy":"retry","validationCode":"if (!fileSystem.exists(path)) {\n    throw new IOException(\"Short-decimal column source file missing: \" + path);\n}","typeGuard":null,"tryCatchPattern":"try {\n    return reader.readNext(timezone);\n} catch (PrestoException e) {\n    if (PARQUET_IO_READ_ERROR.toErrorCode().equals(e.getErrorCode())) {\n        Throwable cause = e.getCause();\n        if (cause instanceof IOException && isTransient(cause)) return retryRead();\n    }\n    throw e;\n}","preventionTips":["Configure retry policies for the storage client (S3 SDK retries, HDFS client retries).","Grant the Presto worker service account stable read permissions on table locations.","Enable fault-tolerant execution so failed splits retry on other workers.","Alert on storage latency/error rates that correlate with query failures."],"tags":["parquet","io","presto-exception","storage"],"backgroundTag":"parquet-io-read-error","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}