filtering flattened projection does not seem to follow projection rules
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- tooling
調査の方向性
この issue ではリポジトリのファイルやテストが指定されていません。まず、2 つの filter-and-flatten クエリを再現し、リンクされている JMESPath の projection ドキュメントと比較してください。filter 式と flatten 式がどのように評価されるかを追跡し、その後、動作が言語規則に一致しているかを確認して、実証されたクエリを回帰ケースまたは明確化したドキュメントに記録してください。
索引モデルが issue の本文から書いたものです。
説明
Scenario
If we have an object like so:
{
"persons": [
{
"name": "bob",
"addresses": [
{
"current": true,
"address": "132 Main Ave"
},
{
"current": false,
"address": "99 1st St"
}
]
},
{
"name": "linda",
"addresses": [
{
"current": true,
"address": "132 Main Ave"
},
{
"current": false,
"address": "99 1st St"
}
]
}
]
}
and the query:
persons[?name=='bob'].addresses[]
I get the result
[
{
"current": true,
"address": "132 Main Ave"
},
{
"current": false,
"address": "99 1st St"
}
]
This seems to line up just fine with the documentation of what a "projection" is in JMES.
It is my understanding that Filter and Flatten are both types of projections. So if I then filter the flattened projection like so
persons[?name=='bob'].addresses[][?current]
I would expect this
[
{
"current": true,
"address": "132 Main Ave"
}
]
but instead I have to pipe the result to a filter projection in order to get this to work:
persons[?name=='bob'].addresses[] | [?current]
Question / Issue
I would not expect that I have to first use the pipe operator in order to achieve that.
Why is it that the filter is not applied as a projection of each result of the flatten operation? Am I misunderstanding something about what is/is not a projection and how the projection algorithm is supposed to work?
- 主要言語
- JavaScript
- スター
- 847
- フォーク
- 105
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jmespath/jmespath.js のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
jmespath/jmespath.js#104 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
jmespath/jmespath.js#100 ·
-
Undocumented `$.` ?オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
jmespath/jmespath.js#99 · コメント 1 件 ·
-
Escape single quotes in a raw string literal対応中かも @n0liu が 51 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
jmespath/jmespath.js#98 · コメント 1 件 ·
-
jmespath.js parser error showing undefined instead of actual token type and value対応中かも @saitakarcesme が 70 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
jmespath/jmespath.js#96 · コメント 1 件 ·
jmespath/jmespath.js の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
yetone/alma-releases#782 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Pomax/markdown-editor#193 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cboard-org/cboard#2449 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
BinaryBaconLabs/todo-app#50 ·
メンテナーはふだん 1 日以内に返信
-
bug server testing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
blamechris/chroxy#9435 ·
メンテナーはふだん 1 日以内に返信