{"record":{"id":"1dd0175fce7daab4","repo":"prestodb/presto","slug":"parquet-io-read-error-1dd017","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/UuidFlatBatchReader.java","lineNumber":110,"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":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/UuidFlatBatchReader.java#L92-L128","documentation":"This PrestoException (PARQUET_IO_READ_ERROR) wraps any IOException thrown while UuidFlatBatchReader.readNext() reads values for a UUID-typed Parquet column chunk. The library throws it to convert low-level I/O failures (HDFS/S3/local reads, stream truncation) into a typed Presto error that identifies the failing column. The original IOException is preserved as the cause.","triggerScenarios":"Calling readNext() on a UUID flat batch reader when the underlying ParquetDataSource throws IOException: truncated file, network/hdfs read failure, closed stream, or corrupted chunk metadata that makes the underlying reader fail mid-read.","commonSituations":"Reading a Parquet file that was truncated by a failed job or incomplete S3 upload; HDFS/S3 network instability during scan; a file written by a buggy producer with chunk sizes exceeding actual bytes.","solutions":["Check the wrapped IOException cause to identify the true I/O failure (connection, permission, truncation).","Verify the Parquet file is complete and readable (file size vs footer-declared bytes; re-upload/re-copy if truncated).","Retry transient network failures at the storage layer or re-run the query; enable retries on S3/HDFS client.","If reproducible, validate the file with a Parquet tool (parquet-tools) to confirm corruption.","Confirm no version mismatch between reader and writer producing unreadable encodings."],"exampleFix":"// before\nColumnChunk chunk = reader.readNext(); // throws PARQUET_IO_READ_ERROR on truncated file\n// after\ntry {\n    ColumnChunk chunk = reader.readNext();\n} catch (PrestoException e) {\n    if (e.getErrorCode().getName().equals(\"PARQUET_IO_READ_ERROR\")) {\n        // inspect e.getCause() IOException; re-fetch/validate the file before retry\n    }\n    throw e;\n}","handlingStrategy":"try-catch","validationCode":"// before reading, verify file completeness\nlong footerLen = 8;\nif (dataSource.readFileSize() < footerLen) throw new IllegalStateException(\"Parquet file truncated: \" + path);\n","typeGuard":null,"tryCatchPattern":"try {\n    ColumnChunk chunk = reader.readNext();\n} catch (PrestoException e) {\n    if (e.getErrorCode().getName().equals(\"PARQUET_IO_READ_ERROR\") && e.getCause() instanceof IOException) {\n        // inspect cause; retry transient storage failures, else fail with path context\n    }\n    throw e;\n}","preventionTips":["Validate file completeness (footer present, size matches) before scanning","Enable S3/HDFS client retries for transient I/O","Use checksummed/committed output (e.g., S3 multipart commit) when writing Parquet","Log file path and offset with the error for triage"],"tags":["parquet","io","uuid","presto"],"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"}