Skip to content

The block stats frame is a frame of a SEAM data file that summarises every data block: entry counts, timestamp bounds and, for each column, counts and min and max values. Readers use it to skip blocks. It is present when the footer’s STATS flag is set, see Footer flags.

Field Encoding Meaning
version u8 1 or 2. Above 2 is NewerFormat("block stats"); 0 is Corrupt.
block count count(n_index) Must equal the number of entries in the block index
per block varint entries, deletes, min_ts, max_ts, rows, opaque, then count(1024) ncols, then ncols column stats One record per block
revision 2 only, per block varint versions code After all the per-block records

The version byte holds the stats revision. Revision 2 appends one versions code per block after the per-block records.

The meaning of the fields:

  • entries and deletes: entry count and delete count of the block.
  • min_ts and max_ts: timestamp bounds.
  • rows: entries summarised per column.
  • opaque: puts not summarised. Block stats then prove nothing about their values, and may_match is true.
  • The column summaries are described on Column stats.

The frame must be consumed exactly.

Revision Producer Page
1 Read-only. SEAM 1 readers accept it, SEAM 1 writers do not produce it. Stats revision 1
2 SEAM 1 writers produce it. It goes with footer revision 5 and its BLOCK_COUNTS flag. Stats revision 2

There is no on-disk zone map. See Zone maps.