pub struct TemporalGraphProcessor;
Expand description
Temporal graph query processor for time-based edge filtering Supports queries like: SELECT * FROM edges WHERE edge_timestamp BETWEEN ‘2024-01-01’ AND ‘2024-12-31’
Implementations§
Source§impl TemporalGraphProcessor
impl TemporalGraphProcessor
pub fn new() -> Self
Sourcepub fn filter_edges_by_time(
&self,
edges: &[TemporalEdge],
time_window: &TimeWindow,
) -> DataFusionResult<Vec<TemporalEdge>>
pub fn filter_edges_by_time( &self, edges: &[TemporalEdge], time_window: &TimeWindow, ) -> DataFusionResult<Vec<TemporalEdge>>
Filter edges by time window Example: Find all edges that occurred between two timestamps
Sourcepub fn get_graph_snapshot(
&self,
edges: &[TemporalEdge],
snapshot_time: i64,
) -> DataFusionResult<Vec<TemporalEdge>>
pub fn get_graph_snapshot( &self, edges: &[TemporalEdge], snapshot_time: i64, ) -> DataFusionResult<Vec<TemporalEdge>>
Get graph snapshot at a specific timestamp Returns all edges that were active at the given time
Sourcepub fn find_temporal_paths(
&self,
edges: &[TemporalEdge],
start_node: &str,
end_node: &str,
time_window: &TimeWindow,
) -> DataFusionResult<Vec<Vec<TemporalEdge>>>
pub fn find_temporal_paths( &self, edges: &[TemporalEdge], start_node: &str, end_node: &str, time_window: &TimeWindow, ) -> DataFusionResult<Vec<Vec<TemporalEdge>>>
Find temporal paths - paths that respect time ordering Each edge in the path must have a timestamp >= previous edge
Sourcepub fn aggregate_by_time_bucket(
&self,
edges: &[TemporalEdge],
bucket_size_seconds: i64,
) -> DataFusionResult<HashMap<i64, usize>>
pub fn aggregate_by_time_bucket( &self, edges: &[TemporalEdge], bucket_size_seconds: i64, ) -> DataFusionResult<HashMap<i64, usize>>
Aggregate edges by time buckets Example: Count edges per hour, day, week, etc.
Sourcepub fn get_active_nodes_at_time(
&self,
edges: &[TemporalEdge],
timestamp: i64,
lookback_window: i64,
) -> DataFusionResult<Vec<String>>
pub fn get_active_nodes_at_time( &self, edges: &[TemporalEdge], timestamp: i64, lookback_window: i64, ) -> DataFusionResult<Vec<String>>
Find active nodes at a specific time Returns nodes that had at least one edge within the time window before the timestamp
Sourcepub fn calculate_temporal_centrality(
&self,
edges: &[TemporalEdge],
node_id: &str,
time_window: &TimeWindow,
) -> DataFusionResult<f64>
pub fn calculate_temporal_centrality( &self, edges: &[TemporalEdge], node_id: &str, time_window: &TimeWindow, ) -> DataFusionResult<f64>
Calculate temporal centrality - how central a node is within a time window
Sourcepub fn parse_and_execute_temporal_query(
&self,
_query: &str,
edges: &[TemporalEdge],
config: &TemporalQueryConfig,
) -> DataFusionResult<Vec<TemporalEdge>>
pub fn parse_and_execute_temporal_query( &self, _query: &str, edges: &[TemporalEdge], config: &TemporalQueryConfig, ) -> DataFusionResult<Vec<TemporalEdge>>
Process a temporal SQL query (simplified parser) Example: “SELECT source, target FROM edges WHERE edge_timestamp BETWEEN 1704067200 AND 1735689600”
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TemporalGraphProcessor
impl RefUnwindSafe for TemporalGraphProcessor
impl Send for TemporalGraphProcessor
impl Sync for TemporalGraphProcessor
impl Unpin for TemporalGraphProcessor
impl UnwindSafe for TemporalGraphProcessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more