Skip to content
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

Add explain command #687

Merged
merged 10 commits into from
Sep 27, 2024
Merged

Add explain command #687

merged 10 commits into from
Sep 27, 2024

Conversation

kt-eliatra
Copy link
Contributor

Description

Add explain command

Issues Resolved

#556

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.

@YANG-DB
Copy link
Member

YANG-DB commented Sep 23, 2024

Please add command usage examples in the main readme markdown
Thanks

@kt-eliatra
Copy link
Contributor Author

Please add command usage examples in the main readme markdown Thanks

done

@YANG-DB YANG-DB added the Lang:PPL Pipe Processing Language support label Sep 25, 2024
@@ -123,7 +125,8 @@ public LogicalPlan visitQuery(Query node, CatalystPlanContext context) {

@Override
public LogicalPlan visitExplain(Explain node, CatalystPlanContext context) {
return node.getStatement().accept(this, context);
node.getStatement().accept(this, context);
return context.apply(p -> new ExplainCommand(p, ExplainMode.fromString("simple")));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what other explain types can we engage ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatted
cost
codegen
extended
simple

Copy link
Member

@YANG-DB YANG-DB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please review the explain options ?
and also add an explain test to validate the expected result ? - it would be nice to add these parameters for the user to request...

@kt-eliatra
Copy link
Contributor Author

Can you please review the explain options ? and also add an explain test to validate the expected result ? - it would be nice to add these parameters for the user to request...

the explain command supports now explain mode argument. I also wrote tests for each mode.

Signed-off-by: Kacper Trochimiak <[email protected]>
Signed-off-by: Kacper Trochimiak <[email protected]>
Signed-off-by: Kacper Trochimiak <[email protected]>
Signed-off-by: Kacper Trochimiak <[email protected]>
Signed-off-by: Kacper Trochimiak <[email protected]>
Signed-off-by: Kacper Trochimiak <[email protected]>
@YANG-DB YANG-DB merged commit 0e56a46 into opensearch-project:main Sep 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.6 Lang:PPL Pipe Processing Language support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants