Skip to main content

Module mutation_common

Module mutation_common 

Source
Expand description

Common infrastructure for DataFusion mutation operators (CREATE, SET, REMOVE, DELETE).

Provides:

  • MutationContext: Shared context for mutation operators containing executor, writer, etc.
  • batches_to_rows: Convert RecordBatches to row-based HashMaps (batch→row direction).
  • rows_to_batches: Convert row-based HashMaps back to RecordBatches (row→batch direction).
  • MutationExec: Eager-barrier RecordBatchStream that collects all input, applies mutations via Writer, and yields output batches.

Structs§

MutationContext
Shared context for mutation operators.
MutationExec
Unified DataFusion ExecutionPlan for all Cypher mutation clauses (CREATE, SET, REMOVE, DELETE).

Enums§

MutationKind
The kind of mutation to apply per row.

Functions§

batches_to_rows
Convert RecordBatches to row-based HashMaps for mutation processing.
execute_mutation_stream
Execute a mutation stream: collect all input batches, apply mutations, yield output.
extended_schema_for_new_vars
Compute an extended output schema that includes columns for newly created variables.
new_create_exec
Create a new MutationExec configured for a CREATE clause.
new_merge_exec
Create a new MutationExec configured for a MERGE clause.
pattern_variable_names
Extract variable names introduced by a CREATE/MERGE pattern.
rows_to_batches
Convert row-based HashMaps back to RecordBatches.