Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG] Allow interacting with nested fields in lambdas (transform, reduce, ...)

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

メンテナーはふだん 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 の本文から書いたものです。

説明

bug PPL untriaged

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

環境構築

はじめの一歩

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

opensearch-project/sql のほかの issue

opensearch-project/sql の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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