[BUG] Allow interacting with nested fields in lambdas (transform, reduce, ...)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- java
調査の方向性
Start by tracing how PPL handles transform lambdas over arrays of nested objects and how typeof(x) determines the element type; the issue does not name source files or tests. Reproduce the provided query against the custom mapping and sample documents, then compare the lambda behavior with expand or mvexpand. Done means nested fields can be accessed in lambda expressions and the reported typeof(x) result is no longer UNDEFINED.
索引モデルが issue の本文から書いたものです。
説明
Query Information
PPL Command/Query:
source = my_index
| eval result = transform(report_columns, x -> concat(x.name, ’ as ', x.label, ''))
| fields id, name, result
Expected Result:
| id | name | result |
|---|---|---|
| identifier1 | name1 | [“docType as Document Type”, “amount as Amount”] |
| identifier2 | name2 | [ ] |
| identifier3 | name3 |
Actual Result:
ExecutePPLQuery received unexpected status code 500: Cannot create lambda function, Cannot create lambda function
Dataset Information
Dataset/Schema Type
- OpenTelemetry (OTEL)
- Simple Schema for Observability (SS4O)
- Open Cybersecurity Schema Framework (OCSF)
- Custom (details below)
Index Mapping
{
"mappings": {
"properties": {
"description": { "type": "text" },
"id": { "type": "keyword" },
"name": { "type": "text" },
"report_columns": {
"type": "nested",
"properties": {
"label": { "type": "keyword" },
"name": { "type": "keyword" },
"position": { "type": "integer" }
}
}
}
}
}
Sample Data
Document 1
{
"_index": "my_index",
"_id": "identifier1",
"_source": {
"id": "identifier1",
"report_columns": [
{
"name": "doctype",
"label": "Document Type",
"position": 1
},
{
"name": "amount",
"label": "Amount",
"position": 2
}
],
"name": "name1",
"description": "description1"
}
}
Document 2
{
"_index": "my_index",
"_id": "identifier2",
"_source": {
"id": "identifier2",
"report_columns": [],
"name": "name2",
"description": "description2"
}
}
Document 3
{
"_index": "my_index",
"_id": "identifier3",
"_source": {
"id": "identifier3",
"name": "name3",
"description": "description3"
}
}
Bug Description
Issue Summary:
I need to properly leverage nested fields in lambdas involved in transform, reduce, etc. when working with arrays of objects
Steps to Reproduce:
Run the provided ppl query against index/documents provided as examples
Additionally, i noticed that the below ppl query identifies all nested fields as type "UNDEFINED"
source = my_index
| eval result = transform(report_columns, x -> typeof(x))
| fields id, name, result
Impact:
I am not able to fully leverage nested fields.
Workardound consists in introducing expand or mvexpand
Environment Information
OpenSearch Version:
OpenSearch 3.7
Additional Details:
N/A
Screenshots
N/A
- 主要言語
- Java
- スター
- 175
- フォーク
- 233
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 39
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
opensearch-project/sql のほかの issue
-
[Enhancement] Make the flat_object read depth cap configurable instead of a constant対応中かも @RyanL1997 が 12 日前に担当しました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
opensearch-project/sql#5842 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] PromQL queries fail with InvalidTypeIdException when metric has a label named "type"対応中かも @nagendramohan が 75 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
opensearch-project/sql#5684 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
[DOC] Calcite settings documentation missing examples対応中かも @AzazelSensei が 32 日前に担当しました。 オープンdocumentation PPL
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
opensearch-project/sql#4806 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement untriaged
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
opensearch-project/sql#5906 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] stats max and min return the same value on a text field without a keyword subfield対応中かも @cnoramut が 1 日前に担当しました。 オープンbug PPL
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
opensearch-project/sql#5900 ·
メンテナーはふだん 1 日以内に返信
opensearch-project/sql の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
AllTheMods/AllTheModium#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/stormcrawler#2264 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
commons-app/apps-android-commons#7115 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
objectionary/lints#1596 ·
メンテナーはふだん 2 日以内に返信