-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update docs & links & add planned commands docs with process suggestion #745
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: 🎆 PPL Command request | ||
about: Request a new PPL command Or syntax change | ||
title: '[PPL-Lang]' | ||
labels: 'enhancement, untriaged' | ||
assignees: '' | ||
--- | ||
**Is your feature request related to a problem?** | ||
A clear and concise description of what the PPL command/syntax change is about, why is it needed, e.g. _I'm always frustrated when [...]_ | ||
|
||
**What solution would you like?** | ||
A clear and concise description of what you want to happen. | ||
- Add Example new / updated syntax | ||
- [Optional] Add suggested [ANTLR](https://www.antlr.org/) suggested grammar | ||
|
||
**Add Proposal Document** | ||
|
||
Under the [docs/planning](../../docs/ppl-lang/planning) folder add a dedicated page for your suggested command or syntax change | ||
|
||
_**Example Proposal Document**_ | ||
|
||
See [ppl-fillnull-command.md](../../docs/ppl-lang/planning/ppl-fillnull-command.md) example | ||
|
||
**Do you have any additional context?** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# OpenSearch PPL Command Development Process | ||
This document outlines the formal process for proposing and implementing new PPL commands or syntax changes in OpenSearch. | ||
|
||
## Phase 1: Proposal | ||
|
||
### 1.1 Create GitHub Issue | ||
|
||
Start by creating a new GitHub issue using the following [template](.github/ISSUE_TEMPLATE/ppl_command_request.md): | ||
``` | ||
name: PPL Command request | ||
about: Request a new PPL command Or syntax change | ||
title: '[PPL-Lang]' | ||
labels: 'enhancement, untriaged' | ||
assignees: '' | ||
--- | ||
|
||
**Is your feature request related to a problem?** | ||
A clear and concise description of what the PPL command/syntax change is about, why is it needed, e.g. _I'm always frustrated when [...]_ | ||
|
||
**What solution would you like?** | ||
A clear and concise description of what you want to happen. | ||
- Add Example new / updated syntax | ||
- [Optional] Add suggested [ANTLR](https://www.antlr.org/) suggested grammar | ||
|
||
**Add Proposal Document** | ||
Under the [docs/planning](../../docs/ppl-lang/planning) folder add a dedicated page for your suggested command or syntax change | ||
|
||
See [ppl-fillnull-command.md](../../docs/ppl-lang/planning/ppl-fillnull-command.md) example | ||
|
||
**Do you have any additional context?** | ||
Add any other context or screenshots about the feature request here. | ||
``` | ||
|
||
### 1.2 Create Planning Document PR | ||
Create a Pull Request that adds a new markdown file under the `docs/ppl-lang/planning folder`. This document should include: | ||
|
||
1) Command overview and motivation | ||
2) Detailed syntax specification | ||
3) Example usage scenarios | ||
4) Implementation considerations | ||
5) Potential limitations or edge cases | ||
|
||
## Phase 2: Review and Approval | ||
|
||
1) Community members and maintainers review the proposal | ||
2) Feedback is incorporated into the planning document / PR comments | ||
3) Proposal is either accepted, rejected, or sent back for revision | ||
|
||
## Phase 3: Experimental Implementation | ||
Once approved, the command enters the experimental phase: | ||
|
||
1) Create implementation PR with: | ||
- Code changes | ||
- Comprehensive test suite | ||
- Documentation updates | ||
|
||
2) Code is clearly marked as experimental using appropriate annotations | ||
3) Documentation indicates experimental status | ||
4) Experimental features are disabled by default in production | ||
|
||
## Phase 4: Maturation | ||
During the experimental phase: | ||
|
||
1) Gather user feedback | ||
2) Address issues and edge cases | ||
3) Refine implementation and documentation | ||
4) Regular review of usage and stability | ||
|
||
## Phase 5: Formal Integration | ||
When the command has matured: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How to measure if the command is matured. You might have a case where a command in experimental phase for months without having any user feedback. |
||
|
||
1) Create PR to remove experimental status | ||
2) Update all documentation to reflect stable status | ||
3) Ensure backward compatibility | ||
4) Merge into main PPL command set | ||
|
||
--- | ||
|
||
## Best Practices | ||
|
||
* Follow existing PPL command patterns and conventions | ||
* Ensure comprehensive test coverage | ||
* Provide clear, detailed documentation with examples | ||
* Consider performance implications | ||
* Maintain backward compatibility when possible | ||
|
||
## Timeline Expectations | ||
|
||
* Proposal Review: 1-2 weeks | ||
* Experimental Phase: 1-3 months | ||
* Maturation to Formal Integration: Based on community feedback and stability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
## fillnull syntax proposal | ||
|
||
1. **Proposed syntax changes with `null` replacement with the same values in various fields** | ||
- `... | fillnull with 0 in field1` | ||
- `... | fillnull with 'N/A' in field1, field2, field3` | ||
- `... | fillnull with 2*pi() + field1 in field2` | ||
- `... | fillnull with concat(field1, field2) in field3, field4` | ||
- `... | fillnull with 'N/A'` | ||
- incorrect syntax | ||
- `... | fillnull with 'N/A' in` | ||
- validation error related to missing columns | ||
|
||
2. **Proposed syntax changes with `null` replacement with the various values in various fields** | ||
* currently implemented, not conform to previous syntax proposal (`fields` addition) | ||
- `... | fillnull fields status_code=101` | ||
- `... | fillnull fields request_path='/not_found', timestamp='*'` | ||
* New syntax proposal | ||
- `... | fillnull using field1=101` | ||
- `... | fillnull using field1=concat(field2, field3), field4=2*pi()*field5` | ||
- `... | fillnull using field1=concat(field2, field3), field4=2*pi()*field5, field6 = 'N/A'` | ||
- `... | fillnull using` | ||
- validation error related to missing columns | ||
|
||
### New syntax definition in ANTLR | ||
|
||
```ANTLR | ||
|
||
fillnullCommand | ||
: FILLNULL (fillNullWithTheSameValue | ||
| fillNullWithFieldVariousValues) | ||
; | ||
|
||
fillNullWithTheSameValue | ||
: WITH nullReplacement IN nullableField (COMMA nullableField)* | ||
; | ||
|
||
fillNullWithFieldVariousValues | ||
: USING nullableField EQUAL nullReplacement (COMMA nullableField EQUAL nullReplacement)* | ||
; | ||
|
||
|
||
nullableField | ||
: fieldExpression | ||
; | ||
|
||
nullReplacement | ||
: expression | ||
; | ||
|
||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to have versioning? Shall we consider backward compatibility with older spark versions? How this process will align with PPL opensearch engine effort?