You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shared relationship variable across pattern parts falls back to a cross join #58
A relationship variable reused in two comma-separated pattern parts should join those parts on that one relationship. Instead, the planner joins them with a cross join and returns every combination.
This returns 8 rows (A four times and B four times); openCypher returns 2 (A and B). The result is the same with and without use_csr=True.
Cause
The logical planner chooses a cross join for the two pattern parts before join keys are inferred, so the shared relationship variable never contributes its endpoint columns as keys. infer_join_keys itself handles relationship variables correctly; a planner test covers it since #51.
Suggested fix
When comma-separated pattern parts share a relationship variable, plan an inner join on that relationship's endpoint columns instead of a cross join.
Activity