-
Notifications
You must be signed in to change notification settings - Fork 177
Support format=yaml in Explain API #4446
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
Conversation
opensearch/src/main/java/org/opensearch/sql/opensearch/executor/OpenSearchExecutionEngine.java
Outdated
Show resolved
Hide resolved
| import org.opensearch.sql.storage.TableScanOperator; | ||
|
|
||
| /** OpenSearch execution engine implementation. */ | ||
| public class OpenSearchExecutionEngine implements ExecutionEngine { |
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.
suggestion (non-blocking): Should we move the explain functionality to a dedicated location?
The class is somewhat large as-is, and I don't like the idea of adding more complexity to OpenSearchExecutionEngine.
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.
Good point!
I like your PR. add yaml format to minic that.
Signed-off-by: Peng Huo <[email protected]>
| "user/admin/settings.rst" | ||
| ], | ||
| "ppl_cli": [ | ||
| "bash_calcite": [ |
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.
Test PPL with calcite
| ----------------------------------- | ||
|
|
||
| The following PPL query demonstrated that where and stats command were pushed down to OpenSearch DSL aggregation query:: | ||
| Explain query:: |
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.
Refresh doctest will correct response. Not breaking change.
| assertYamlEqualsIgnoreId( | ||
| expected, | ||
| explainQueryToString( | ||
| explainQueryYaml( |
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.
Leverage Yaml response format.
Deprecated assertYamlEqualsJsonIgnoreId function. @ykmr1224 Please take a look
| builder.put(STANDARD.formatName, STANDARD); | ||
| builder.put(EXTENDED.formatName, EXTENDED); | ||
| builder.put(COST.formatName, COST); |
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.
These not response FORMAT. We should deprecated these in 4.0 and suggest user using explain statement
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
Signed-off-by: Peng Huo <[email protected]>
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-2.19-dev 2.19-dev
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.19-dev
# Create a new branch
git switch --create backport/backport-4446-to-2.19-dev
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d6a9719f3c8d73f1b274842c5b83e7df7df5d9ca
# Push it to GitHub
git push --set-upstream origin backport/backport-4446-to-2.19-dev
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.19-devThen, create a pull request where the |
|
may need to manual backport it |
--------- Signed-off-by: Peng Huo <[email protected]>
|
Manual backport #4609 |
--------- Signed-off-by: Peng Huo <[email protected]>
* Support format=yaml in Explain API (#4446) --------- Signed-off-by: Peng Huo <[email protected]> * Fix compile issue in main (#4608) Signed-off-by: Peng Huo <[email protected]> * Update Signed-off-by: Peng Huo <[email protected]> * update doc Signed-off-by: Peng Huo <[email protected]> * Update Signed-off-by: Peng Huo <[email protected]> --------- Signed-off-by: Peng Huo <[email protected]>
Description
Related Issues
#4351
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.