Skip to content

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

@earthling-shruti

Description

@earthling-shruti

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    PPLPiped processing languagedocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    Status

    Not Started

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions