Skip to main content

flush_batch_physical

Function flush_batch_physical 

Source
pub async fn flush_batch_physical(
    table_batches: &[TableBatch],
    physical_table_name: &str,
    ctx: &QueryContextRef,
    partition_manager: &(impl PhysicalFlushPartitionProvider + ?Sized),
    node_manager: &(impl PhysicalFlushNodeRequester + ?Sized),
    catalog_manager: &(impl PhysicalFlushCatalogProvider + ?Sized),
) -> Result<()>
Expand description

Flushes a batch of logical table rows by transforming them into the physical table format and writing them to the appropriate datanode regions.

This function performs the end-to-end physical flush pipeline:

  1. Resolves the physical table metadata and column ID mapping.
  2. Fetches the physical table’s partition rule.
  3. Transforms each logical table batch into the physical (sparse primary key) format.
  4. Concatenates all transformed batches into a single combined batch.
  5. Splits the combined batch by partition rule and sends region write requests concurrently to the target datanodes.