opensearch-project / opensearch-project/sql

[FEATURE] Support field aliases that target text multi-fields in SQL/PPL

Open
#5,632 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem
A field alias whose path points to a text multi-field (e.g. alias title_rawtitle.raw, where title is text with fields.raw as keyword) cannot be resolved by SQL/PPL. #5535/#5536 handled the resulting NullPointerException by returning FIELD_NOT_FOUND, but the alias pattern itself is still unsupported.

Request
Resolve aliases whose target is a text multi-field, so SELECT title_raw FROM index returns the sub-field value — consistent with how OpenSearch core resolves these aliases in native search.

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 tracing the SQL/PPL field-alias resolution path and review the handling introduced by #5535/#5536 for text multi-fields. Compare it with OpenSearch core's native alias resolution, then verify that an alias such as title_raw targeting title.raw returns the sub-field value in SELECT title_raw FROM index without FIELD_NOT_FOUND.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.