`<=`, `>=` and `>` give wrong results for missing values and for booleans

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

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

評価

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

調査の方向性

Start by reading the comparison handling for <=, >=, and > and the tests for JSONPath filters; the issue does not name file paths, so locate those entry points in the Go repository. Check the missing-value and boolean cases against the RFC and jsonpath-rfc9535 results described here. Done means the two examples return [{}] and [] respectively, with regression tests covering both.

索引モデルが issue の本文から書いたものです。

説明

Two comparison cases come out wrong:

  • $[[email protected] <= @.b] on [{}] returns []. Both sides are missing, and missing equals missing, so <= should hold and
    it should return [{}]. >= has the same problem.
  • $[?true > false] on [1] returns [1]. Booleans aren't ordered by <, and true isn't equal to false, so >
    should be false and it should return [].

The RFC defines <= as "less-than or equal", with < defined only for two numbers or two strings, and equality of two
missing values being true. jsonpath-rfc9535 gives the expected results on both.

主要言語
Go
スター
41
フォーク
4
平均マージ
2日 8時間
マージ済み PR(30日)
3

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

theory/jsonpath のほかの issue

theory/jsonpath の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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