added cloudwatch style contains operator#5219
added cloudwatch style contains operator#5219ThyTran1402 wants to merge 2 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Thy Tran <58045538+ThyTran1402@users.noreply.github.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
| JSONObject result = | ||
| executeQuery( | ||
| String.format( | ||
| "source=%s | where firstname contains 'mbe' | fields firstname", |
There was a problem hiding this comment.
is the contains case-sensitive or insensitive? Need more tests for this.
Can you link the cloudwatch doc link in description?
And this PR should include user document updates. maybe in condition.md
There was a problem hiding this comment.
I think contains is case-insensitive since it's implemented with ILIKE with %value% wrapping.
If a user writes firstname contains '%', the wrapped pattern becomes %%% which would match everything, which is likely unintended. I'll fix this and add more test cases.
Here is the doc provided: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax-Filter.html
Signed-off-by: Thy Tran <58045538+ThyTran1402@users.noreply.github.com>
Description
Behavior:
Related Issues
Resolves #5181
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.