opensearch-project / opensearch-project/sql

[FEATURE] Support dynamic columns in PPL

Open
#4,112 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement PPL
Dominant language
Java
Stars
176
Forks
229
Avg merge
2d 21h
Merged PRs (30d)
43

Description

Is your feature request related to a problem?
Certain PPL operators naturally require data-driven (dynamic) columns whose names and counts are not known at plan time. It is the blocker to support timechart and spath command

Example — timechart pivot
source=logs
| timechart span=1h count() by status limit=3

Problem: The set of status labels (e.g., ERROR, OK, TIMEOUT) is only known at runtime and can vary by dataset. Producing a wide, pivoted table requires dynamic columns, which are not available under a fixed per-operator schema.

Example — spath with object keys
source=idx
| spath input=doc path=event.tags

Problem: event.tags is a JSON object whose keys differ across documents. The extracted keys are unknown until read, so the output columns are inherently dynamic.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names PPL support for dynamic columns and gives timechart and spath examples. Start by locating how PPL operators represent and validate output schemas, then trace the planning and execution paths for those operators. Done means the examples can produce runtime-defined columns without requiring a fixed per-operator schema.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.