Skip to main content

Module write_partition

Module write_partition 

Source
Expand description

Add or remove view partitions

Structs§

PartitionOverlapConflict
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.
PartitionRowSet
A set of rows for a partition, along with their time range.
RowSetTrackingResult
Result of write_rows_and_track_times: the partition’s event time range, alongside the folded max_sort_key_time. pub because write_rows_and_track_times is itself pub and is called from rust/analytics/tests/, which compiles as an external crate.

Enums§

RetireMatch
Which SQL predicate retire_partitions uses 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 whatever retire_match says it replaces first.
insert_partitions_replacing
Replaces every partition of view_meta contained in unit_range by partitions, 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 of unit_range and have been written by write_file without being registered.
retire_expired_partitions
retire_partitions
Retires partitions from the active set.
write_partition_file
Writes the rows of rb_stream to a new parquet file and returns the Partition describing it, without registering it in lakehouse_partitions. The caller owns the file until it is registered: if it never is, it must delete the file (see delete_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.