Cypher on SQL stores: all(), any(), none() and single() are two-valued where the predicate is null
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
調査の方向性
Start at _quantifier() in drivine/cypher/sql/sql_cypher_compiler.py and compare its SQL generation with the described behavior in drivine4j and the cases in drivine-cypher-spec v0.6.7. Check how the generated query handles null predicates and null lists for all four quantifiers. Done means SQL stores match the stated three-valued Cypher semantics.
索引モデルが issue の本文から書いたものです。
説明
Port of liberation-data/drivine4j#272.
What happens: on the SQL stores, all(), any(), none() and single() are two-valued where the predicate is null. Cypher's quantifiers are three-valued: a quantifier whose predicate is null for some item, with no item that decides it, is null.
MATCH (n:Person) WHERE none(x IN [1] WHERE n.name IN ['Keanu']) RETURN count(n)
MATCH (n:Person) WHERE all(x IN [1] WHERE n.name = 'x') RETURN count(n)
For a node with no name, Neo4j drops the row, because the quantifier is null. The SQL stores keep it, because NOT EXISTS (… WHERE NOT cond) reads a null cond as true.
Expected: three-valued quantifiers, as drivine4j does since liberation-data/drivine4j#283:
- all(): false if any item is false, else null if any is null, else true;
- any(): true if any is true, else null if any is null, else false;
- none(): the negation of any();
- single(): null when a null item could change the count of true items around one.
drivine4j keeps the cheap EXISTS forms in a WHERE that reads only the truth, where the predicate can't be null. Otherwise it uses one scalar count subquery, mapped to 1/0/NULL and compared = 1, and guards a null list. The cases are in drivine-cypher-spec v0.6.7.
Where: _quantifier() in drivine/cypher/sql/sql_cypher_compiler.py.
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1時間 13分
- マージ済み PR(30日)
- 109
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
liberation-data/drivine-python のほかの issue
-
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 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
liberation-data/drivine-python#219 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
liberation-data/drivine-python#218 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
liberation-data/drivine-python#215 ·
メンテナーはふだん 1 日以内に返信
liberation-data/drivine-python の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
MIT-LCP/wfdb-python#590 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
pollen-robotics/reachy_mini#1517 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
NRLMMD-GEOIPS/pluginify#41 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
scverse/spatialdata#1293 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
UKGovernmentBEIS/inspect_evals#2788 ·
メンテナーはふだん 1 日以内に返信