Skip to main content

Module common

Module common 

Source
Expand description

Common helpers shared across graph execution plan implementations.

This module provides shared utilities to reduce code duplication across the df_graph module’s execution plan implementations.

Functions§

append_edge_to_struct
Append a single edge to an edge struct builder.
append_edge_to_struct_optional
Append an edge to a struct builder, handling the Option<Eid> case.
append_node_to_struct
Append a single node to a node struct builder.
append_node_to_struct_optional
Append a node to a struct builder, handling the Option<Vid> case.
arrow_err
Convert an ArrowError into a DataFusionError.
build_edge_list_field
Build edge list field for schema with given step variable name.
build_path_struct_array
Build a path struct array from nodes and relationships list arrays.
build_path_struct_field
Build path struct field for schema with given path variable name.
calculate_score
Convert a raw distance value into a normalised similarity score.
collect_all_partitions
Collect all record batches from all partitions of an execution plan.
column_as_vid_array
Extract a UInt64Array of vertex/edge IDs from an Arrow column.
compute_plan_properties
Compute standard plan properties for graph operators.
cv_array_to_large_list
Convert a LargeBinaryArray of CypherValue-encoded arrays into a LargeListArray.
edge_struct_fields
Build the standard edge struct fields for path structures.
encode_props_to_cv
Encode a properties HashMap to CypherValue bytes for LargeBinary columns.
execute_subplan
Execute a logical plan using a fresh HybridPhysicalPlanner with the given params.
execute_subplan_with_outer_vars
Like execute_subplan, but with outer entity variable names for nested EXISTS.
extend_schema_with_path
Extend an input schema with a path struct field.
extract_row_params
Extract a single row from a RecordBatch as a HashMap of column name → Value.
extract_vids_from_cypher_value_column
Extract VIDs from a column of CypherValue-encoded Node values.
infer_logical_plan_schema
Infer the output schema of a logical plan using UniSchema property metadata.
labels_data_type
Return the Arrow DataType for _labels columns: List<Utf8>.
large_list_of_cv_to_cv_array
Re-encode a LargeListArray of CypherValue elements into a LargeBinaryArray of CypherValue arrays.
merged_edge_schema_props
Merge edge property metadata across multiple edge types.
new_edge_list_builder
Create a ListBuilder<StructBuilder> for building edge list arrays.
new_node_list_builder
Create a ListBuilder<StructBuilder> for building node list arrays.
node_struct_fields
Build the standard node struct fields for path structures.
typed_large_list_to_cv_array
Convert a typed LargeListArray to a LargeBinaryArray of CypherValue arrays.