Undirected relationship patterns match outgoing edges only
还没有人认领这个 Issue。
评估
调研方向
Start in datafusion_planner/join_ops.rs and trace the RelationshipDirection::Undirected cases named in the issue. Read test_undirected_join_qualified_keys and compare its key-name assertions with the Alice → Bob reproduction. Done when the query returns Alice from Bob’s undirected match and tests cover both edge directions and self-loops.
由索引模型根据 Issue 内容生成。
描述
An undirected relationship pattern, (a)-[:R]-(b), is planned as outgoing only, so it misses every edge that points at a.
Repro (on main, e260cf6): one edge, Alice → Bob.
// Person(id, name) = [(1, "Alice"), (2, "Bob")]; KNOWS(src, dst) = [(1, 2)]
let config = GraphConfig::builder()
.with_node_label("Person", "id")
.with_relationship("KNOWS", "src", "dst")
.build()?;
// MATCH (a:Person)-[:KNOWS]-(b:Person) WHERE a.name = 'Alice' RETURN b.name -> ["Bob"] (ok)
// MATCH (a:Person)-[:KNOWS]-(b:Person) WHERE a.name = 'Bob' RETURN b.name -> [] (expected ["Alice"])
Cause. In datafusion_planner/join_ops.rs, RelationshipDirection::Undirected picks the same keys as Outgoing in each match (lines 101, 146, 222, 249, 261): source joins source_id_field, target joins target_id_field. test_undirected_join_qualified_keys checks the qualified key names, not that both directions are matched.
A possible fix. Plan an undirected expand as the union of the outgoing and the incoming expand, each with its own keys, deduplicating only a self-loop that both would return. A single join on (a = src AND b = dst) OR (a = dst AND b = src) also works, but DataFusion then cannot use a hash join on it. Variable-length paths built from the unrolled expands would pick this up as well. Happy to open a PR along those lines if that approach suits you.
- 主要语言
- Rust
- 星标
- 189
- 派生
- 40
- 平均合并
- 16 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lance-format/lance-graph 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
lance-format/lance-graph#171 ·
-
LDBC benchmark: insignificant performance gain from enabling Lance dataset indexes for LanceGraph未关闭
难度 4/5 3-5 天 新手友好度 35/100
lance-format/lance-graph#166 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
lance-format/lance-graph#165 ·
-
难度 5/5 一周以上 新手友好度 25/100
lance-format/lance-graph#164 ·
-
难度 5/5 一周以上 新手友好度 35/100
lance-format/lance-graph#163 · 3 条评论 ·
查看 lance-format/lance-graph 的全部 Issue
相似的 Issue
-
area:cli area:security bug priority:medium
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
status: new topic: ga4gh-sdk type: bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
comp-rbac
难度 2/5 1-3 小时 新手友好度 68/100
ClickHouse/ClickHouse#131875 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
googleworkspace/cli#984 ·
维护者通常 1 天内回复