-
Notifications
You must be signed in to change notification settings - Fork 141
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
Support more parameters for AD and KMEANS command, and update related documentation #515
Conversation
Signed-off-by: jackieyanghan <[email protected]>
…documentation Signed-off-by: jackieyanghan <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #515 +/- ##
============================================
- Coverage 95.24% 94.59% -0.66%
+ Complexity 2744 2742 -2
============================================
Files 276 276
Lines 7410 7454 +44
Branches 537 550 +13
============================================
- Hits 7058 7051 -7
- Misses 298 349 +51
Partials 54 54
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
ppl/src/main/java/org/opensearch/sql/ppl/utils/ArgumentFactory.java
Outdated
Show resolved
Hide resolved
@@ -309,7 +309,7 @@ protected UnresolvedPlan aggregateResult(UnresolvedPlan aggregate, UnresolvedPla | |||
|
|||
@Override | |||
public UnresolvedPlan visitKmeansCommand(KmeansCommandContext ctx) { | |||
return new Kmeans(ArgumentFactory.getArgumentList(ctx)); | |||
return new Kmeans(ArgumentFactory.getArgumentMap(ctx)); |
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.
Could you try to avoid if..else in getArgumentMap() by add label to antlr and using visitor to access each arguments? https://github.com/antlr/antlr4/blob/master/doc/parser-rules.md#alternative-labels
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.
Tweaked the code by adding label and using visitor
ppl/src/main/java/org/opensearch/sql/ppl/utils/ArgumentFactory.java
Outdated
Show resolved
Hide resolved
Signed-off-by: jackieyanghan <[email protected]>
opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperator.java
Show resolved
Hide resolved
ppl/src/main/java/org/opensearch/sql/ppl/parser/AstExpressionBuilder.java
Outdated
Show resolved
Hide resolved
A question about resource release: is there any problem that |
ppl/src/test/java/org/opensearch/sql/ppl/parser/AstBuilderTest.java
Outdated
Show resolved
Hide resolved
@dai-chen |
Okay. Asking just in case we need to close it manually. Thanks! |
Signed-off-by: jackieyanghan <[email protected]>
ppl/src/main/java/org/opensearch/sql/ppl/parser/AstBuilder.java
Outdated
Show resolved
Hide resolved
Signed-off-by: jackieyanghan <[email protected]>
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.
LGTM
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.
Thanks for the changes!
… documentation (#515) Signed-off-by: jackieyanghan <[email protected]>
Description
Issues Resolved
(#462)
Check List
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.