-
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
json-valid PPL function #3230
base: main
Are you sure you want to change the base?
json-valid PPL function #3230
Conversation
Signed-off-by: Kenrick Yap <[email protected]>
9cdfd71
to
70152eb
Compare
core/src/main/java/org/opensearch/sql/expression/json/JsonFunctions.java
Outdated
Show resolved
Hide resolved
@kenrickyap can you please add the relevant documentation for this new function? |
Signed-off-by: Kenrick Yap <[email protected]>
f84e21d
to
76c3995
Compare
Signed-off-by: Kenrick Yap <[email protected]>
Added doctest, integ-test, and unit tests |
core/src/main/java/org/opensearch/sql/expression/json/JsonFunctions.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/opensearch/sql/expression/json/JsonFunctionsTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/opensearch/sql/expression/json/JsonFunctionsTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/opensearch/sql/expression/json/JsonFunctionsTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/opensearch/sql/expression/json/JsonFunctionsTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/opensearch/sql/expression/json/JsonFunctionsTest.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/resources/indexDefinitions/json_test_index_mappping.json
Outdated
Show resolved
Hide resolved
Signed-off-by: Kenrick Yap <[email protected]>
core/src/main/java/org/opensearch/sql/expression/json/JsonFunctions.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/expression/json/JsonFunctions.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Kenrick Yap <[email protected]>
2bf025d
to
ccf47a2
Compare
3 unit test are failing due to 2024 -> 2025 year change DateTimeFunctionTest > testWeekOfYearWithTimeType() There is existing issues for said failed test cases: #2477 I have disabled test until above issue is addressed |
Signed-off-by: Kenrick Yap <[email protected]>
Signed-off-by: Kenrick Yap <[email protected]>
Signed-off-by: Kenrick Yap <[email protected]>
pipeline is failing as disabled test are affecting code coverage. will first resolve #2477, then merge this ticket |
Signed-off-by: Kenrick Yap <[email protected]>
Signed-off-by: Kenrick Yap <[email protected]>
Signed-off-by: Kenrick Yap <[email protected]>
integ-test/src/test/java/org/opensearch/sql/ppl/JsonFunctionIT.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/resources/indexDefinitions/json_test_index_mappping.json
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrew Carbonetto <[email protected]> Signed-off-by: kenrickyap <[email protected]>
….java Co-authored-by: Andrew Carbonetto <[email protected]> Signed-off-by: kenrickyap <[email protected]>
Signed-off-by: Kenrick Yap <[email protected]>
…nsearch-project-sql into feature/json-valid Signed-off-by: Kenrick Yap <[email protected]>
9fc5d8a
to
5e1e488
Compare
Signed-off-by: Kenrick Yap <[email protected]>
Signed-off-by: Kenrick Yap <[email protected]>
@@ -0,0 +1,35 @@ | |||
==================== | |||
IP Address Functions |
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.
why is the title IP Address Functions
?
{"test_name":"json array", "json_string":"[1, 2, 3, 4]"} | ||
{"test_name":"json scalar string", "json_string":"\"abc\""} | ||
{"test_name":"json empty string","json_string":""} | ||
{"test_name":"json invalid object", "json_string":"{\"invalid\":\"json\", \"string\"}"} |
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.
can you also add complex nested json object sample ?
Description
Based on this feature request: #3207
Added json_valid request.
Related Issues
Resolves #3207
Check List
--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.