=~ with (?x) and a pattern that ends in a # comment fails on Postgres and SQLite, and is false on Oracle
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 57/100
調査の方向性
Read the Cypher compilation path that wraps =~ patterns and handles flags, then check the database-specific behavior described for Postgres, SQLite, and Oracle. Reproduce the supplied (?x) example and add the stated spec case to liberation-data/drivine-cypher-spec. Done means the case returns true across the affected stores, including Oracle's handling of # comments.
索引モデルが issue の本文から書いたものです。
説明
In compiled Cypher, =~ wraps the pattern in a group of its own and appends the closing parenthesis and the end anchor on the same line: \A( … )\Z on Postgres, \A( … )\z on Oracle, ^(?: … )\z on SQLite. Under (?x), a # starts a comment that runs to the end of the line, so a pattern that ends in a comment comments out what was appended:
RETURN 'ab' =~ '(?x)ab # c'
| Store | Gives |
|---|---|
Neo4j (Java's matches()) |
true |
| Postgres | error: invalid regular expression: parentheses () not balanced |
| SQLite | error: Unclosed group (Java's PatternSyntaxException) |
| Oracle | false: its x ignores whitespace but takes # literally |
'(?x)a b' (no comment) already gives true on Postgres and Oracle.
A fix would put a line break before what is appended when the flags hold x, which ends the comment and, under x, is otherwise ignored. Oracle would also need its # comments taken out, as its x doesn't read them. A spec case ('ab' =~ '(?x)ab # c' is true) should go into liberation-data/drivine-cypher-spec with the fix.
Checked directly on Postgres 17, Oracle Free 23 and Java 25.
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1時間 21分
- マージ済み PR(30日)
- 128
環境構築
このプロジェクトには開発コンテナ、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日 初心者へのやさしさ 45/100
liberation-data/drivine-python#280 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
liberation-data/drivine-python#279 ·
メンテナーはふだん 1 日以内に返信
liberation-data/drivine-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagation対応中かも @muskan-creates352 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
mllam/neural-lam#848 ·
メンテナーはふだん 2 日以内に返信
-
infra
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
fab-geocommuns/RNB-coeur#1166 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
deepspeedai/DeepSpeed#8951 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws/context-ontology-accelerator#343 ·
メンテナーはふだん 1 日以内に返信