opensearch-project / opensearch-project/sql
[DOC] Add comprehensive documentation for COALESCE function and pre-3.1 alternatives
Nobody has claimed this yet.
- 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:
- 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
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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