Port of liberation-data/drivine4j#349
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #248 @jasperblues による — マージ済み
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
調査の方向性
Start by reading drivine/cypher/sql/sql_cypher_compiler.py around line 3895 and compare the SQL store compilers’ toString handling, including the Postgres and Oracle locations named in the issue. Then review liberation-data/drivine4j#349 and port its statements and Neo4j rows as tests. Done means list comparisons follow item-by-item ordering with null for unordered pairs, and every SQL store refuses toString on lists and maps.
索引モデルが issue の本文から書いたものです。
説明
Port of liberation-data/drivine4j#349: on SQL stores, <, <=, > and >= between lists give null, and toString of a list gives a value, where Neo4j compares the lists and refuses toString.
From the code, this library has the same two defects. I read the code only; nothing has been run against a database here.
- Comparison.
drivine/cypher/sql/sql_cypher_compiler.py:3895has the same shape as drivine4j's: under the comment "Values of two kinds are not ordered", the ordering comparison isCASE WHEN typeOf(x) = typeOf(y) AND typeOf(x) IN ('number', 'string', 'boolean') THEN ... END. Two lists share a kind but aren't in that list, so[1, 2] < [1, 3]should give null where Neo4j givestrue. toString. I found no check that refuses a list or a map argument. Postgres compiles it asto_jsonb(_as_text(json))(drivine/cypher/sql/postgres_cypher_compiler.py:426), and Oracle asCOALESCE(JSON_SCALAR(_as_text(json)), JSON_SCALAR(_long_text(json)))(drivine/cypher/sql/oracle_cypher_compiler.py:694). SotoString([1, 2])should give the store's text of the JSON, where Neo4j refuses the statement ("Type mismatch: expected Boolean, Float, Integer, ... but was List"). The exact values each store gives haven't been checked here.
What to do: follow the fix for liberation-data/drivine4j#349.
- Order two lists item by item, by the first unequal pair, with a shorter prefix first. A pair that can't be ordered gives null. The list sort key that ORDER BY already uses may serve.
- Refuse
toStringof a list or a map when compiling, on every SQL store.
Tests to port: drivine4j#349's statements and Neo4j's rows, plus the refusal check.
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1時間 29分
- マージ済み PR(30日)
- 136
環境構築
このプロジェクトには開発コンテナ、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日 初心者へのやさしさ 55/100
liberation-data/drivine-python#297 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
liberation-data/drivine-python#295 ·
メンテナーはふだん 1 日以内に返信
liberation-data/drivine-python の issue をすべて見る
似ている issue
-
getchaintips leaves out the active tip once a header is staged on it, where Core always lists itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
btclib-org/btclib-node#2158 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
dbt-msft/dbt-sqlserver#897 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Gathin23/cleanyourtv#2770 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
vllm-project/vllm#64845 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
dekobon/big-code-analysis#1729 ·
メンテナーはふだん 1 日以内に返信