Temporal Joins

Generic Description

Is a live Cypher function in Nexyron. It is documented separately because time construction, sequence ordering, window parameters, and as-of behavior materially change analytical meaning.

Simple example:

RETURN asof_join(
  [{ts: 1500, a: 'x'}, {ts: 2500, a: 'y'}],
  [{ts: 1000, b: 'm'}, {ts: 2000, b: 'n'}]
)

Consumer-Level Explanation

Use it when the function semantics match the query intent exactly. Prefer this function when the temporal assumption should be visible to the planner, especially for event streams, freshness checks, and sequence features.

More Detailed Explanation

Temporal Joins should be understood by the value shape it expects and the row shape it returns. It composes with MATCH, WHERE, WITH, RETURN, and procedure output, so planner-facing documentation should describe both the immediate value transformation and why it belongs in the database query.

Advanced Example

This example names the event stream and operational context before applying Temporal Joins, which helps planner tooling preserve the intended sequence semantics.

CALL nexyron.temporal_history(123, 'position', 0, 10000)
YIELD ts, value
WITH collect({ts: ts, lat: value.lat, lon: value.lon}) AS gps
MATCH (r:Runner)-[e:MEASURED]->(m:Metric)
WHERE id(r) = 123
WITH gps,
     collect({ts: e.ts, hr: m.heart_rate}) AS hr
RETURN asof_join(hr, gps) AS heart_rate_with_position,
       context_alignment_join(hr, gps, 30000) AS nearest_context_rows

Real Use Cases

Real Limitations And Tradeoffs