Cypher on SQL stores: lists or maps holding a null relationship compare true, where Cypher gives null
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 61/100
調査の方向性
Start in drivine/cypher/sql/sql_cypher_compiler.py at _equality (around line 3068) and inspect how it compares JSON values and checks for nulls. Then add a direct regression case to tests/integration/test_cypher_compiled.py using the supplied Cypher statements; compare results on Postgres and Oracle with Cypher's expected null propagation. Done means both stores return null for equal collections containing nulls and false when a pair of items differs.
索引モデルが issue の本文から書いたものです。
説明
Port of liberation-data/drivine4j#225.
What happens here: on Postgres and Oracle, a list or map equality that reaches a null item gives True, where Cypher and Neo4j give null. Run on main (d4932f7) through the cypher_pm fixture with QuerySpecification(cypher_statement(...)):
UNWIND [1] AS x OPTIONAL MATCH (p:Probe225)-[r:NOPE]->()
RETURN [[r] = [r], {x: r} = {x: r}, [r, 1] = [null, 1]]
gives [[True, True, True]] on both Postgres and Oracle. The relationship isn't needed for this. A null literal does the same:
RETURN [[null] = [null], {x: null} = {x: null}, [null, 1] = [null, 1], [1, null] = [2, null]]
gives [[True, True, True, False]] on both. Neo4j gives null, null, null, false. The last one is right: one pair differs, so the result is false.
Where: _equality (drivine/cypher/sql/sql_cypher_compiler.py:3068) compares the two sides' JSON whole (comparable(json(...)), :3086-3087). Its null test (:3093-3101) only checks whether each side as a whole is JSON null, so a list or map that holds a null item is compared as a document, and JSON '[null]' = JSON '[null]' is true on both stores. This matches drivine4j's guess: list and map equality compare the JSON documents whole.
Expected: null when a comparison reaches a null item and no pair of items differs, as Cypher's list and map equality does: [null] = [null] is null, and [1, null] = [2, null] is false.
Tests to port: whatever drivine4j adds for #225, probably a case in drivine-cypher-spec. The statements above make a direct test in tests/integration/test_cypher_compiled.py. SQLite isn't a store here yet (#93).
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1時間 19分
- マージ済み PR(30日)
- 122
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
liberation-data/drivine-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
liberation-data/drivine-python#252 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 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日 初心者へのやさしさ 58/100
liberation-data/drivine-python#243 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
liberation-data/drivine-python の issue をすべて見る
似ている issue
-
area/profiles comp/cli P3 type/feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NousResearch/hermes-agent#146372 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] OpenAI-compatible embedding model alias breaks embedder construction対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistencies対応中かも @github-actions が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
GeoSeries scale and skew tests fail with pytest 9.2.0対応中かも @jiayuasu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
admission-deferred priority: medium status: ready work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
melodic-software/claude-code-plugins#10887 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信