prestodb/presto · error · OrcCorruptionException
Value is not null but seconds stream is missing
Error message
Value is not null but seconds stream is missing
What it means
Corruption signal from the ORC timestamp reader: the present stream marks rows as non-null for the rows being skipped/read, yet the row group carries no DATA stream for the seconds component, so the values cannot be decoded. It points to a malformed, truncated, or writer-buggy ORC file identified by the data source id.
Source
Thrown at presto-orc/src/main/java/com/facebook/presto/orc/reader/TimestampBatchStreamReader.java:105
}
@Override
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);
}View on GitHub (pinned to 55bb57d202)
Solutions
- Locate the offending ORC file from the OrcDataSourceId in the exception and check how it was produced (writer version, interrupted write, truncated upload).
- Reproduce with the hive.orc.use-bloom-filters off and compare; if the file is truly corrupt, re-generate it from the source table.
- If the column is not needed, exclude it from the query or recreate the table schema so the corrupt column is skipped.
- Upgrade Presto/the ORC writer if a known writer bug produced non-canonical timestamp streams.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-orc/src/main/java/com/facebook/presto/orc/reader/TimestampBatchStreamReader.java:105 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/86e5ada56313703d.
Report an issue: GitHub.