Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Port of liberation-data/drivine4j#349

クローズ
#215 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #248 @jasperblues による — マージ済み

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
neo4j, postgresql, python, sql
領域
backend, databases

調査の方向性

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 の本文から書いたものです。

説明

bug

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:3895 has the same shape as drivine4j's: under the comment "Values of two kinds are not ordered", the ordering comparison is CASE 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 gives true.
  • toString. I found no check that refuses a list or a map argument. Postgres compiles it as to_jsonb(_as_text(json)) (drivine/cypher/sql/postgres_cypher_compiler.py:426), and Oracle as COALESCE(JSON_SCALAR(_as_text(json)), JSON_SCALAR(_long_text(json))) (drivine/cypher/sql/oracle_cypher_compiler.py:694). So toString([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 toString of 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

liberation-data/drivine-python のほかの issue

liberation-data/drivine-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。