Postgres: =~ with a negated bracket expression does not match a line break
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
調査の方向性
Start by reading the =~ compilation path and the existing (?m) anchor fix mentioned in the issue. Check how the generated pattern behaves in Postgres for dots, negated bracket expressions, and Java-style escapes, then add the stated regression case to liberation-data/drivine-cypher-spec. Done when the Postgres result matches Neo4j, Oracle, and SQLite for the example.
索引モデルが issue の本文から書いたものです。
説明
On Postgres, compiled Cypher's =~ runs the pattern in Postgres's partial newline-sensitive mode ((?p)), so that a dot matches no line break, as Java's does. That mode also stops a negated bracket expression from matching a line break, which Java's does:
RETURN 'a\nb' =~ 'a[^x]b'
Neo4j (Java's matches()) gives true; Postgres gives false. Oracle and SQLite give true.
No Postgres mode both keeps a dot off a line break and lets a negated bracket match one, so a fix would mean rewriting the pattern: each unescaped . outside a bracket as [^\n] (and \N-style escapes as Java reads them), with the pattern run in Postgres's default mode, and (?s) leaving the dots alone.
Found by a review of the (?m) anchor fix. A spec case ('a\nb' =~ 'a[^x]b' is true) should go into liberation-data/drivine-cypher-spec with the fix.
- 主要言語
- Python
- スター
- 1
- フォーク
- 0
- 平均マージ
- 1時間 19分
- マージ済み PR(30日)
- 122
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
liberation-data/drivine-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
liberation-data/drivine-python#252 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 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日 初心者へのやさしさ 58/100
liberation-data/drivine-python#243 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
liberation-data/drivine-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4860 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
:bug: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
scikit-image/scikit-image#8377 ·
メンテナーはふだん 1 日以内に返信
-
Ingredient import validation accepts negative nutrient values and NaN対応中かも @LukeSekai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
wger-project/wger#2564 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/ponymail-foal#351 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 4 日以内に返信