opensearch-project / opensearch-project/sql

[DOC] Add comprehensive documentation for COALESCE function and pre-3.1 alternatives

Open
#4,199 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What do you want to do?

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

Tell us about your request. Provide a summary of the request.
Documentation is needed for COALESCE functionality in OpenSearch SQL/PPL in two areas:

  1. OpenSearch 3.1+ COALESCE function:

Document the new native COALESCE function syntax and usage
Include common use cases and examples
Provide performance considerations
Document any limitations or restrictions

  1. Pre-3.1 COALESCE alternative patterns:
    Add documentation for achieving COALESCE-like functionality in OpenSearch versions prior to 3.1. While OpenSearch 3.1+ has native COALESCE support, earlier versions can achieve similar results using nested IFNULL statements. This documentation will help users working with older OpenSearch versions handle null values across multiple fields effectively.

Example use case:

ifnull(cast(attributes.http.response.status_code as int), 
       ifnull(cast(attributes.http.status_code as int),  
              -1))

Version: List the OpenSearch version to which this issue applies, e.g. 2.14, 2.12--2.14, or all.
3.1+ for native COALESCE documentation
Pre-3.1 for alternative patterns

What other resources are available? Provide links to related issues, POCs, steps for testing, etc.

  • Can be tested using any pre-3.1 OpenSearch instance with sample HTTP data
  • Addresses common observability use cases where field names may vary

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 reviewing the existing OpenSearch SQL/PPL function documentation and the current COALESCE support for version 3.1+. Verify the native syntax and nested IFNULL examples against a 3.1+ instance and a pre-3.1 OpenSearch instance with sample HTTP data. Done means both version-specific sections cover syntax, use cases, performance considerations, and limitations.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.