Expand description
Add or remove view partitions
Structs§
- Partition
Overlap Conflict - A new partition overlaps an existing one that the write’s retire step did not replace (SQLSTATE
23P01 on
lakehouse_partitions_no_overlap). Typed so that a caller that can recompute its plan, such as the JIT views racing another writer, can tell it apart from other failures. - Partition
RowSet - A set of rows for a partition, along with their time range.
- RowSet
Tracking Result - Result of
write_rows_and_track_times: the partition’s event time range, alongside the foldedmax_sort_key_time.pubbecausewrite_rows_and_track_timesis itselfpuband is called fromrust/analytics/tests/, which compiles as an external crate.
Enums§
- Retire
Match - Which SQL predicate
retire_partitionsuses to find partitions to replace.
Functions§
- add_
file_ for_ cleanup - Adds a file to the temporary_files table for cleanup.
- insert_
partition - Inserts a partition into
lakehouse_partitions, retiring whateverretire_matchsays it replaces first. - insert_
partitions_ replacing - Replaces every partition of
view_metacontained inunit_rangebypartitions, in one transaction: readers see either the old rows or all of the new ones, never a gap. The partitions must tile a sub-range ofunit_rangeand have been written bywrite_filewithout being registered. - retire_
expired_ partitions - retire_
partitions - Retires partitions from the active set.
- write_
partition_ file - Writes the rows of
rb_streamto a new parquet file and returns thePartitiondescribing it, without registering it inlakehouse_partitions. The caller owns the file until it is registered: if it never is, it must delete the file (seedelete_if_orphan). - write_
partition_ from_ rows - Writes a partition to a Parquet file from a stream of
PartitionRowSets. - write_
rows_ and_ track_ times - Writes rows from the stream and tracks event time ranges.