Cypher on SQL stores: a node given by coalesce() or CASE isn't a node, so MATCH (x)-->(d) from it, or labels(x), is refused (port of drivine4j#440)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start in drivine/cypher/sql/sql_cypher_compiler.py, reading the coalesce handling around line 4830, pattern variable handling around lines 1657 and 2441, and labels() around line 4802. Use TCK Match7 #22 and the two proposed queries from the issue to guide the behavior and tests. Done means node-valued coalesce and CASE expressions work as pattern inputs and with labels(), while a null node used as a pattern matches nothing.
索引モデルが issue の本文から書いたものです。
説明
Port of liberation-data/drivine4j#440.
What happens. A node given by coalesce() or CASE is no longer a node in compiled Cypher. A pattern that starts from it, as in TCK Match7 #22's WITH coalesce(b, c) AS x MATCH (x)-->(d) RETURN d, is refused with "x is not a node, and is used as one in a pattern.", and labels(x) with "labels() takes a node.". Neo4j runs both. x.num works.
Where. coalesce always gives JSON, whatever its arguments (drivine/cypher/sql/sql_cypher_compiler.py:4830). A pattern accepts only a node value for a variable in scope (drivine/cypher/sql/sql_cypher_compiler.py:1657, and :2441 for writes). labels() takes only a node (drivine/cypher/sql/sql_cypher_compiler.py:4802). Read at drivine-python origin/main (7e2998e).
The fix. drivine4j has no fix yet. It proposes that a coalesce or CASE of nodes (or null literals) give a node value whose nid, labels, props and stamp are each the COALESCE or CASE of the arguments' columns, so a pattern from a null node matches nothing.
Tests to port. TCK Match7 #22, and from drivine4j#440: MATCH (a:Single) OPTIONAL MATCH (a)-->(c:NonExistent) WITH coalesce(c, a) AS x MATCH (x)-->(y) RETURN y.num and WITH CASE WHEN true THEN b ELSE a END AS x MATCH (x)-->(d) RETURN labels(d).
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1時間 21分
- マージ済み PR(30日)
- 128
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
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 ·
-
Partial method descriptors raise on class access対応中かも @Gambit-Checkmate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 19 日以内に返信
-
docs pkg:core
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
pydantic/pydantic-ai#11929 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
intake/intake-esm#789 ·