You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ppl-lang/functions/ppl-json.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,12 +206,12 @@ Example:
206
206
207
207
**Description**
208
208
209
-
`json_set(json_string, array(<path>, <value>, ...))` Inserts or updates one or more values at the corresponding paths in the specified JSON object.
209
+
`json_set(json_string, array(path1, value1, path2, value2, ...))` Inserts or updates one or more values at the corresponding paths in the specified JSON object.
210
210
211
211
**Argument type:**
212
212
-\<json_string\> must be a JSON_STRING.
213
213
-\<path\> must be a STRING.
214
-
-\<value\>can be a JSON_STRING.
214
+
-\<value\>must be a JSON_STRING.
215
215
216
216
**Return type:** JSON_STRING
217
217
@@ -232,9 +232,9 @@ Example:
232
232
233
233
**Description**
234
234
235
-
`json_delete(json_string, [keys list])` Deletes json elements from a json object based on json specific keys. Return the updated object after keys deletion .
235
+
`json_delete(json_string, array(key1, key2, ...))` Deletes json elements from a json object based on json specific keys. Return the updated object after keys deletion .
`json_append(json_string, [path_key, value,...])` appends values to end of an array at path_key within the json elements. Return the updated json object after appending.
273
+
`json_append(json_string, [path_key1, value1, path_key2, value2, ...])` appends values to end of an array at path_key within the json elements. Return the updated json object after appending.
274
274
275
275
**Argument type:**
276
276
-\<json_string\> must be a JSON_STRING.
@@ -319,7 +319,7 @@ Example:
319
319
320
320
**Description**
321
321
322
-
`json_extend(json_string, [path_key, value,...])` extends values to end of an array at path_key within the json elements. Return the updated json object after extending.
322
+
`json_extend(json_string, [path_key1, value1, path_key2, value2, ...])` extends values to end of an array at path_key within the json elements. Return the updated json object after extending.
323
323
324
324
**Argument type:**
325
325
-\<json_string\> must be a JSON_STRING.
@@ -370,7 +370,7 @@ Example:
370
370
371
371
`json_keys(jsonStr)` Returns all the keys of the outermost JSON object as an array.
372
372
373
-
**Argument type:**STRING
373
+
**Argument type:**JSON_STRING
374
374
375
375
A STRING expression of a valid JSON object format.
Copy file name to clipboardExpand all lines: ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanJsonFunctionsTranslatorTestSuite.scala
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -197,14 +197,14 @@ class PPLLogicalPlanJsonFunctionsTranslatorTestSuite
197
197
planTransformer.visit(
198
198
plan(
199
199
pplParser,
200
-
"""source=t | eval result = json_set('{"a":[{"b":1},{"c":2}]}', array('a.b', 3, 'a.c', 4))"""),
200
+
"""source=t | eval result = json_set('{"a":[{"b":1},{"c":2}]}', array('a.b', '3', 'a.c', '4'))"""),
0 commit comments