Support format=yaml in Explain API#4446
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.
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.
Good point!
I like your PR. add yaml format to minic that.
Signed-off-by: Peng Huo <penghuo@gmail.com>
| "user/admin/settings.rst" | ||
| ], | ||
| "ppl_cli": [ | ||
| "bash_calcite": [ |
There was a problem hiding this comment.
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.
Refresh doctest will correct response. Not breaking change.
| assertYamlEqualsIgnoreId( | ||
| expected, | ||
| explainQueryToString( | ||
| explainQueryYaml( |
There was a problem hiding this comment.
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.
These not response FORMAT. We should deprecated these in 4.0 and suggest user using explain statement
Signed-off-by: Peng Huo <penghuo@gmail.com>
Signed-off-by: Peng Huo <penghuo@gmail.com>
Signed-off-by: Peng Huo <penghuo@gmail.com>
|
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 <penghuo@gmail.com>
|
Manual backport #4609 |
--------- Signed-off-by: Peng Huo <penghuo@gmail.com>
* Support format=yaml in Explain API (#4446) --------- Signed-off-by: Peng Huo <penghuo@gmail.com> * Fix compile issue in main (#4608) Signed-off-by: Peng Huo <penghuo@gmail.com> * Update Signed-off-by: Peng Huo <penghuo@gmail.com> * update doc Signed-off-by: Peng Huo <penghuo@gmail.com> * Update Signed-off-by: Peng Huo <penghuo@gmail.com> --------- Signed-off-by: Peng Huo <penghuo@gmail.com>
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.