Skip to content

Commit

Permalink
Minor change to polish the documents
Browse files Browse the repository at this point in the history
Signed-off-by: Heng Qian <qianheng@amazon.com>
  • Loading branch information
qianheng-aws committed Nov 5, 2024
1 parent 83cd46c commit f8d25e5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/ppl-lang/functions/ppl-lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@ Example:
| true |
+-----------+

**Note:** The lambda expression can access the nested fields of the array elements. This applies to all lambda functions introduced in this document. See the examples below:
**Note:** The lambda expression can access the nested fields of the array elements. This applies to all lambda functions introduced in this document.

Consider constructing the following array:

array = [
{"a":1, "b":1},
{"a":-1, "b":2}
]

and perform lambda functions against the nested fields `a` or `b`. See the examples:

os> source=people | eval array = json_array(json_object("a", 1, "b", 1), json_object("a" , -1, "b", 2)), result = forall(array, x -> x.a > 0) | fields result
fetched rows / total rows = 1/1
Expand Down

0 comments on commit f8d25e5

Please sign in to comment.