prestodb/presto · error · InvalidCheckpointException
Not enough positions for column %s and sequence %s, of type
Error message
Not enough positions for column %s and sequence %s, of type %s, checkpoints
What it means
Checkpoint decoding consumes positions one at a time from the column's position list. When a stream checkpoint (Boolean, Byte, Long V1/V2, row-group dictionary length, etc.) requests the next position but the list is exhausted, InvalidCheckpointException is thrown: the stripe footer did not record enough positions for the streams declared in the file.
Source
Thrown at presto-orc/src/main/java/com/facebook/presto/orc/checkpoint/Checkpoints.java:506
this.sequence = sequence;
this.columnType = requireNonNull(columnType, "columnType is null");
this.positions = requireNonNull(positions, "positions is null");
}
public int getIndex()
{
return index;
}
public boolean hasNextPosition()
{
return index < positions.length;
}
public int nextPosition()
{
if (!hasNextPosition()) {
throw new InvalidCheckpointException("Not enough positions for column %s and sequence %s, of type %s, checkpoints",
column,
sequence,
columnType);
}
return positions[index++];
}
}
private static class ColumnAndSequence
{
private final int column;
private final int sequence;
private ColumnAndSequence(int column, int sequence)
{
this.column = column;
this.sequence = sequence;View on GitHub (pinned to 55bb57d202)
Solutions
- Validate/inspect the failing file's stripe footer with orc-tools to see which stream lacks positions.
- Rewrite the file (CTAS) with a supported current writer version.
- Upgrade/downgrade the reader to match the writer's ORC/DWRF version conventions.
- Restore the file from backup if corruption is confirmed (checksums won't match).
Defensive patterns
Strategy: try-catch
Try / catch
try { checkpoints = Checkpoints.getStreamCheckpoints(...); }
catch (InvalidCheckpointException e) { disableCheckpointOptimizationForFile(fileId, e); } Prevention
- Avoid writer/reader version skew
- Run orc-tools validation on ingested files
- Restore corrupted files from backup
When it happens
Trigger: nextPosition() called by checkpoint factories (BooleanStreamCheckpoint, ByteStreamCheckpoint, LongStreamV1/V2Checkpoint, RowGroupDictionaryLengthStreamCheckpoint, createInputStreamCheckpoint) when index >= positions.length during getStreamCheckpoints on a stripe footer with too-few position entries.
Common situations: Corrupted or truncated stripe footers, files written by older/buggy writers omitting positions for some encodings, or reader/writer version skew changing how many positions each stream expects.
Related errors
- Column %s, of type %s, contains %s offset positions, but onl
- Reset stream has a block offset but stream is not compressed
- NOT_SUPPORTED
- HIVE_WRITER_CLOSE_ERROR
- HIVE_WRITER_OPEN_ERROR
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/8436ddab96cb5678.
Report an issue: GitHub.