opensearch-project / opensearch-project/sql

[BUG] source = * does not work

Open
#4,444 2 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

Query Information

PPL Command/Query:

source = *

Expected Result:
it should be a valid PPL query

Actual Result:

[<EOF>] is not a valid term at this part of the query: 'source = *' <-- HERE. Expecting one of 370 possible tokens. Some examples: 'SEARCH', 'DESCRIBE', 'SHOW', 'EXPLAIN', 'FROM', ...

Dataset Information

Dataset/Schema Type

  • OpenTelemetry (OTEL)
  • Simple Schema for Observability (SS4O)
  • Open Cybersecurity Schema Framework (OCSF)
  • Custom (details below)

It doesn't matter i don't think

Index Mapping

does not matter

Sample Data

Does not matter

Bug Description

Issue Summary:

Steps to Reproduce:

  1. On OSD, create an index pattern with pattern: "*"
  2. try querying with it, it will result in error

Impact:

  • we are introducing a concept called "virtual datasets" in OSD, where if the user has not predefined a dataset, we will default to "*", ie selecting all indexes in your data source. We can mitigate the issue by adding backticks, but ideally this should be handled by the grammar.

Environment Information

OpenSearch Version:
all, tested on latest

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

Start by reproducing the PPL query source = * on the latest OpenSearch version and compare it with the backtick workaround described in the issue. Trace the PPL grammar responsible for parsing the source expression and add a regression test for the wildcard form. Done means source = * is accepted as a valid PPL query.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.