Module flat_format

Source
Expand description

Format to store in parquet.

It can store both encoded primary key and raw key columns.

We store two additional internal columns at last:

  • __primary_key, the encoded primary key of the row (tags). Type: dictionary(uint32, binary)
  • __sequence, the sequence number of a row. Type: uint64
  • __op_type, the op type of the row. Type: uint8

The format is

primary key columns, field columns, time index, encoded primary key, __sequence, __op_type.

It stores field columns in the same order as [RegionMetadata::field_columns()](store_api::metadata::RegionMetadata::field_columns())
and stores primary key columns in the same order as [RegionMetadata::primary_key].

Structsยง

FlatReadFormat
Helper for reading the flat SST format with projection.
FlatWriteFormat ๐Ÿ”’
Helper for writing the SST format.

Functionsยง

primary_key_column_index ๐Ÿ”’
Returns the position of the primary key column.
sequence_column_index ๐Ÿ”’
Returns the position of the sequence column.
sst_column_id_indices ๐Ÿ”’
Returns a map that the key is the column id and the value is the column position in the SST. It only supports SSTs with raw primary key columns.
time_index_column_index ๐Ÿ”’
Returns the position of the time index column.