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

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)

オープン
#277 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, sql
領域
backend, databases

調査の方向性

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

説明

bug

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

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

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

似ている issue

Python の issue をもっと見る

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

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