Repository navigation
feat(graph): add mapped property graphs and bounded SQL graph queries - #1502
Open
wangyunlai-seekdb wants to merge 177 commits into
Open
wangyunlai-seekdb wants to merge 177 commits into
wangyunlai-seekdb wants to merge 177 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
wangyunlai-seekdb
force-pushed
the
feat/graph
branch
from
October 14, 2026 04:17
c30a6f6 to
e401267
Compare
hnwyllmm
marked this pull request as draft
October 15, 2026 06:31
wangyunlai-seekdb
force-pushed
the
feat/graph
branch
from
October 16, 2026 04:29
2cccc6d to
3240e5d
Compare
hnwyllmm
marked this pull request as ready for review
October 16, 2026 04:30
Introduce a dedicated graph feedback logical operator and keep recursive CTE reuse confined to the physical layer. Rename the path metadata type to GraphPathDesc and extend prepared WALK parameter rebinding coverage.
…tup-retry fix(storage): retain asynchronous freeze requests across transient admission failures
…ed-collation fix(sql): restore URL codecs with supported UTF-8 collations
Avoid full macro-buffer initialization for small metadata writes
…est-pruning Optimize bounded ANY SHORTEST traversal for S1/S2
…ath-state-delivery Avoid graph path-state realloc peak under 32 MiB work area
…rget-pruning Reduce repeated target lookups in native shortest traversal
…erator Optimize bound-pair graph shortest paths with bidirectional search
…on-optimization Optimize native graph reachability execution
…c9-ic5 Fix graph subquery cardinality estimation
…code Speed up wide packed integer decoding for IC9
Adapt graph JSON and local DDL calls to the current interfaces, migrate graph mysqltests to the current layout, and preserve metadata rows and aligned-write initialization.
Check the implied depth filter without the independent endpoint exclusion. Preserve the existing estimate threshold and verify that endpoint filters still reduce cardinality.
Construct graph relations with Rust-owned syntax while preserving parameter provenance, native feedback loops and the existing graph SQL semantics. Align workarea accounting with the current backing allocator interfaces. Rebind shared graph metadata atomically when TRUNCATE recreates table IDs, including schema history and prepared-plan invalidation.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务描述
为 SeekDB 增加基于现有关联表的属性图和有界图查询,使图遍历可以与普通 SQL、向量检索和全文检索组合。
本 PR 汇总
feat/graph上已逐项交付的图能力。当前分支已合入 mastere82516fb9a6f,并完成 Rust PEG 解析器、DDL 和 SQL 工作区接口的适配。根因
master 已删除旧
ParseNode解析入口,原图绑定代码无法直接使用。新解析器按语法节点身份保存参数信息,直接复制表达式会丢失参数绑定。此外,master 的TRUNCATE会删除并重建新的表 ID;图映射如果仍指向旧表,依赖检查会拒绝操作,绕过检查则会留下失效映射。解决方案
CREATE/DROP/SHOW CREATE、JSON 元数据、schema/权限依赖和 8 个INFORMATION_SCHEMA视图。GRAPH_TABLE固定链、单个有界量化段、零跳、OUT/IN/双向遍历、WALK/TRAIL/ACYCLIC,以及有界无权ANY SHORTEST。MATCHNUM()/ELEMENT_NUMBER();LATERAL 关联种子和 prepared 参数重绑保留 SQL bag 语义。TRUNCATE在同一 DDL 事务内校验映射定义、更新所有引用图的表 ID、图版本、当前/历史 catalog 和内部 ALTER 事件,使 prepared/cache 计划重新绑定。验证
最终验证提交:
25603f2e84cca6519dcdc730b6b28476d515a0b2;已包含 mastere82516fb9a6fc13ff9c7757c5290c261ab4751a5。TMPDIR="$PWD/build-verify/tmp" ./build.py build -o build-verify -j32 --repo_contents_cache= --keep_going //src/observer:seekdb,二进制内嵌 revision 与被测提交一致。cargo clippy -p sql-parser --all-targets -- -D warnings通过。seekdb_test验证:通过。 父 pipeline 392358 和 实际测试子 pipeline 392362 均成功,22/22 子任务通过:14 个图专项,加 8 个 mysqltest 分片的 19/19 普通 SQL 用例。逐项读取了全部图专项摘要及 SQL 分片日志,无跳过、无重试、无证据缺失。e6fedd4380273f316283a6bb788a69b14eb712d3,Linux x86_64,沿用原专项资源与参数。用例更新决定:测试适配提交 更新 PEG 的精确诊断文本/位置,将合法的限定引用字段改为精确结果断言,并将已删除的 allocator 视图替换为现存 SQL 工作区诊断视图。真实语法错误仍断言 1064,取消/超时错误码、完整结果、事务与锁释放断言均保留。与原 master 的 Rust 解析器实跑对照,六条相关普通输入的接受情况和错误位置一致。5bfb827e42f9669d67f51b5fa9495ff0ad4873c62bcbbdd2b04af1ba6b49bfea。CI 实际包已回读验证,所有子任务的压缩包校验值一致;access-DDL 在 CI 同时核验了真实服务端的完整源码 revision 和 ELF 哈希。复用脚本的空 source 字段、此前的 URL 摘要不作为源码身份依据。git diff --check upstream/master..HEAD通过。本轮排查、评审与保留的失败记录
影响范围
本轮在 Linux x86_64、Rust 1.100.0、Bazel 9.3.0 上验证。其他平台以各自 CI 结果为准;未将历史性能、恢复或长稳记录视为当前提交的重新实测。
边界:最多 16 跳、一个量化段;未提供 SIMPLE、无界/加权/全部最短路径、图执行器 PX 或图状态落盘。社区发现、PageRank 等图分析算法不属于本 PR 的内核能力。图属性仍直接映射基表列。
合入理由
提供事务内可组合的基础图检索和可追溯路径结果,并与当前 SQL/存储实现统一。最终验证状态以上述结果为准;本轮不新增性能对比结论。