Compiled Cypher: a sort key beside a variable-length walk is written at every level, compiling to megabytes
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in drivine/cypher/sql/sql_cypher_compiler.py at _project's sort-term handling around line 2697, then compare it with _shared_first and the drivine4j#378 fix. Port the corresponding compiled-size test from CompiledSizeTest, plus any cross-engine assertion added upstream. Done means the example no longer expands to megabytes of SQL and the ported tests pass.
由索引模型根据 Issue 内容生成。
描述
Port of liberation-data/drivine4j#378.
An ORDER BY term that isn't an aggregate, and isn't one of the items, is written out again at every level when it sits beside a variable-length walk. A modest sort key then compiles to megabytes of SQL.
MATCH (a:CyAgg)-[:NEXT*1..2]->(b:CyAgg)
RETURN a.id AS a, b.id AS bb
ORDER BY (datetime(b.at) + duration({minutes: b.m})).minute, a, bb
Compiled size on main (0a3a8be), and on the port of drivine4j#359 for #193, which doesn't change this path:
| Store | This statement | With the sort key worked out in a WITH first |
|---|---|---|
| Postgres | 2,416,481 characters | 13,547 |
| Oracle | 5,617,352 characters | 13,654 |
These are the same sizes drivine4j reports.
Where: drivine/cypher/sql/sql_cypher_compiler.py:2697, in _project's sort terms. Beside a walk (select.walks), the order term is compiled through self._unshared(carry), so nothing in it is bound once. This is the same shape as drivine4j#333, which #193 ports through _shared_first. Statements this size failed in drivine4j#333 with ORA-03113 on Oracle. This one hasn't been run against a store yet.
Fix: port the fix for drivine4j#378 once it lands. The likely fix is to work a non-trivial order term out first, in its own WITH *, beside a walk, as _shared_first does for an aggregate's argument.
Tests to port: drivine4j's size case for drivine4j#378 in CompiledSizeTest, and its cross-engine assertion if it adds one.
- 主要语言
- Python
- 星标
- 1
- 派生
- 0
- 平均合并
- 1 小时 21 分钟
- 30 天内合并 PR
- 128
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
liberation-data/drivine-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
liberation-data/drivine-python#250 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 88/100
liberation-data/drivine-python#209 ·
维护者通常 1 天内回复
-
CI: three Oracle-only tests in test_cypher_compiled.py never run, as -k oracle doesn't select them未关闭
难度 1/5 1 小时以内 新手友好度 88/100
liberation-data/drivine-python#178 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
liberation-data/drivine-python#280 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 68/100
liberation-data/drivine-python#279 ·
维护者通常 1 天内回复
查看 liberation-data/drivine-python 的全部 Issue
相似的 Issue
-
Support .aac audio uploads可能已有人在做 @julien731 今天认领。 未关闭feature
难度 2/5 1-3 小时 新手友好度 78/100
nimblehq/audio-transcriber#153 ·
-
help wanted
难度 2/5 1-3 小时 新手友好度 68/100
antonyrag/ragleap-core#1062 ·
-
needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
gke-labs/kube-agents#4321 ·
维护者通常 1 天内回复
-
enhancement help wanted
难度 2/5 1-3 小时 新手友好度 76/100
Git-Hospital/githealthcheck#61 ·
维护者通常 1 天内回复
-
changelog investigate
难度 2/5 1-3 小时 新手友好度 67/100
ramnes/notion-sdk-py#433 ·