opensearch-project / opensearch-project/sql

[FEATURE] Unclear PPL error message: Empty mapping on wildcard indices

Open
#4,872 3 comments 0 reactions 1 assignee View on GitHub

@anohedr is already working on this.

Since Jun 15, 2026.

enhancement error-experience 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?
Suppose a cluster has multiple indices with incompatible mappings, and both are matched by the same wildcard:

  • idx-a -> Mapping A
  • idx-b -> Mapping B

source = idx-* then returns the error: Failed to read mapping for index pattern [[Ljava.lang.String;@9acdf8].

This error is because no mapping is returned by the mapping endpoint.

Here's a real-world example, checking a specific OCSF index in a cluster with many such indices:

% curl 'ocsf-1.1.0-2004-detection_finding-2025.03.20-000034/_mapping' | jq .
{
  "ocsf-1.1.0-2004-detection_finding-2025.03.20-000034": {
    "mappings": {
      // Redacted
    }
}

But trying to get all OCSF indices returns an empty mapping:

% curl 'oscf-1.1.0*/_mapping'
{}

What solution would you like?
Clarify the error message. Something like Found an invalid index mapping for 'ocsf-1.1.0*'. Check that all indices matching the pattern share a valid mapping.

What alternatives have you considered?
N/A

Do you have any additional context?
Internal tracking (for AWS employees): https://t.corp.amazon.com/P343512413

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.