prestodb/presto · error · OrcCorruptionException
Value is not null but nanos stream is missing
Error message
Value is not null but nanos stream is missing
What it means
TimestampBatchStreamReader.readBlock: a non-null value was indicated by the present stream but the nanoseconds secondary stream is absent from the ORC file, so the timestamp cannot be reconstructed — the file's stream layout is corrupt.
Source
Thrown at presto-orc/src/main/java/com/facebook/presto/orc/reader/TimestampBatchStreamReader.java:108
public Block readBlock()
throws IOException
{
if (!rowGroupOpen) {
openRowGroup();
}
if (readOffset > 0) {
if (presentStream != null) {
// skip ahead the present bit reader, but count the set bits
// and use this as the skip size for the data reader
readOffset = presentStream.countBitsSet(readOffset);
}
if (readOffset > 0) {
if (secondsStream == null) {
throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is not null but seconds stream is missing");
}
if (nanosStream == null) {
throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is not null but nanos stream is missing");
}
secondsStream.skip(readOffset);
nanosStream.skip(readOffset);
}
}
Block block;
if (secondsStream == null && nanosStream == null) {
if (presentStream == null) {
throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is null but present stream is missing");
}
presentStream.skip(nextBatchSize);
block = RunLengthEncodedBlock.create(TIMESTAMP, null, nextBatchSize);
}
else if (presentStream == null) {
block = readNonNullBlock();
}View on GitHub (pinned to 55bb57d202)
Solutions
- Recreate the ORC file with a correct writer
- Check for partial/corrupt files in storage
- Skip the affected split via query fault tolerance
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-orc/src/main/java/com/facebook/presto/orc/reader/TimestampBatchStreamReader.java:108 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/631afb967b5f167e.
Report an issue: GitHub.