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

fixPPLAllowedFields #181

Merged
merged 2 commits into from
Feb 4, 2024
Merged

Conversation

xinyual
Copy link
Collaborator

@xinyual xinyual commented Feb 4, 2024

Description

fix PPL allow fields

Issues Resolved

fix PPL allow fields

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: xinyual <[email protected]>
@@ -95,7 +97,28 @@ public class PPLTool implements Tool {

private static Map<String, String> defaultPromptDict;

private static Set<String> allowedFieldsType;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Static variables usually follows capital underscore separated naming convention, e.g. ALLOWED_FIELDS_TYPE, please change this one as well as the defaultPromptDict one. Also make them to final since they shouldn't be changed anywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure

Signed-off-by: xinyual <[email protected]>
Copy link

codecov bot commented Feb 4, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (940ac32) 81.75% compared to head (f839160) 81.91%.

Files Patch % Lines
.../main/java/org/opensearch/agent/tools/PPLTool.java 82.14% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #181      +/-   ##
============================================
+ Coverage     81.75%   81.91%   +0.16%     
  Complexity      197      197              
============================================
  Files            13       13              
  Lines          1003     1023      +20     
  Branches        132      134       +2     
============================================
+ Hits            820      838      +18     
- Misses          133      134       +1     
- Partials         50       51       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zane-neo zane-neo merged commit 9174e4c into opensearch-project:main Feb 4, 2024
13 of 14 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 4, 2024
* fixPPLAllowedFields

Signed-off-by: xinyual <[email protected]>

* rename variables

Signed-off-by: xinyual <[email protected]>

---------

Signed-off-by: xinyual <[email protected]>
(cherry picked from commit 9174e4c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
xinyual pushed a commit that referenced this pull request Feb 4, 2024
* fixPPLAllowedFields



* rename variables



---------


(cherry picked from commit 9174e4c)

Signed-off-by: xinyual <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
yuye-aws pushed a commit to yuye-aws/skills that referenced this pull request Apr 26, 2024
* fixPPLAllowedFields

* rename variables

---------

(cherry picked from commit 9174e4c)

Signed-off-by: xinyual <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: yuye-aws <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants