{"record":{"id":"911ad26979c21853","repo":"prestodb/presto","slug":"value-is-not-null-but-data-stream-is-not-present-911ad2","errorCode":null,"errorMessage":"Value is not null but data stream is not present","messagePattern":"Value is not null but data stream is not present","errorType":"exception","errorClass":"OrcCorruptionException","httpStatus":null,"severity":"error","filePath":"presto-orc/src/main/java/com/facebook/presto/orc/reader/FloatBatchStreamReader.java","lineNumber":97,"sourceCode":"    }\n\n    @Override\n    public Block readBlock()\n            throws IOException\n    {\n        if (!rowGroupOpen) {\n            openRowGroup();\n        }\n\n        if (readOffset > 0) {\n            if (presentStream != null) {\n                // skip ahead the present bit reader, but count the set bits\n                // and use this as the skip size for the data reader\n                readOffset = presentStream.countBitsSet(readOffset);\n            }\n            if (readOffset > 0) {\n                if (dataStream == null) {\n                    throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), \"Value is not null but data stream is not present\");\n                }\n                dataStream.skip(readOffset);\n            }\n        }\n\n        if (dataStream == null && presentStream != null) {\n            presentStream.skip(nextBatchSize);\n            Block nullValueBlock = RunLengthEncodedBlock.create(type, null, nextBatchSize);\n            readOffset = 0;\n            nextBatchSize = 0;\n            return nullValueBlock;\n        }\n\n        BlockBuilder builder = type.createBlockBuilder(null, nextBatchSize);\n        if (presentStream == null) {\n            if (dataStream == null) {\n                throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), \"Value is not null but data stream is not present\");\n            }","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-orc/src/main/java/com/facebook/presto/orc/reader/FloatBatchStreamReader.java#L79-L115","documentation":"FloatBatchStreamReader.readBlock throws this when skipping to readOffset non-null values: the FLOAT column's data stream is required for the skip but is absent from the stripe. Like the double variant, missing DATA stream for a non-null value range indicates a corrupt or miswritten file.","triggerScenarios":"readBlock performs a seek where presentStream.countBitsSet(readOffset) > 0 but stripe metadata contains no DATA stream for the float column.","commonSituations":"Corrupt or truncated ORC files; writers that omit float DATA streams; null-count/stream-manifest inconsistencies; unsupported writer versions.","solutions":["Inspect stripe streams via orc-tools meta dump.","Rewrite/re-export the file with a compliant ORC writer.","Fix the writer to always produce DATA streams for populated row groups.","Validate file integrity (checksum, row counts) at write/ingest time."],"exampleFix":"// before\n// assume file is fine\n// after\n// fail fast at ingestion\nif (!validateOrcStripes(file)) {\n    throw new IOException(\"ORC file failed stripe validation; do not use: \" + file);\n}","handlingStrategy":"validation","validationCode":"// Check float column streams before reading\nif (!stripeHasStream(file, floatColumnId, StreamKind.DATA)) {\n    throw new IllegalStateException(\"Float column missing DATA stream in \" + file);\n}","typeGuard":null,"tryCatchPattern":"try {\n    pageSource.getNextPage();\n} catch (OrcCorruptionException e) {\n    metrics.increment(\"orc.corrupt.float.data\");\n    throw new UnrecoverableDataSourceException(\"Regenerate ORC file\", e);\n}","preventionTips":["Validate stream manifests at ingestion time.","Re-download truncated files instead of retrying reads.","Ensure custom writers emit DATA streams for every populated row group.","Monitor writer releases for fixed stream-emission bugs."],"tags":["orc","corruption","float","missing-stream"],"backgroundTag":"orc-corrupt-file","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"}