File tree 2 files changed +8
-6
lines changed
core/src/test/java/org/opensearch/sql/expression/json
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -290,10 +290,12 @@ void json_extract_throws_SemanticCheckException() {
290
290
DSL .literal (new ExprStringValue ("{\" invalid\" :\" json\" , \" string\" }" )),
291
291
DSL .literal (new ExprStringValue ("$.a" )))
292
292
.valueOf ());
293
- assertEquals (
294
- "JSON string '\" {\" invalid\" :\" json\" , \" string\" }\" ' is not valid. Error details:"
295
- + " net.minidev.json.parser.ParseException: Unexpected character (}) at position 26." ,
296
- invalidJsonError .getMessage ());
293
+ assertTrue (
294
+ invalidJsonError
295
+ .getMessage ()
296
+ .startsWith (
297
+ "JSON string '\" {\" invalid\" :\" json\" , \" string\" }\" ' is not valid. Error"
298
+ + " details:" ));
297
299
}
298
300
299
301
@ Test
Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ Argument type: STRING, STRING
75
75
76
76
Return type: STRING/BOOLEAN/DOUBLE/INTEGER/NULL/STRUCT/ARRAY
77
77
78
- - Returns a JSON array if path points to multiple results (e.g. $.a[*]) or if the path points to an array.
79
- - Return null if path is not valid is MISSING or NULL.
78
+ - Returns a JSON array if ` path ` points to multiple results (e.g. $.a[*]) or if the ` path ` points to an array.
79
+ - Return null if ` path ` is not valid, or if JSON ` doc ` is MISSING or NULL.
80
80
- Throws SemanticCheckException if `doc ` or `path ` is malformed.
81
81
- Throws ExpressionEvaluationException if `path ` is missing.
82
82
You can’t perform that action at this time.
0 commit comments