From d29bf602cebbd92a114312b9ad7c519341850e41 Mon Sep 17 00:00:00 2001 From: Lantao Jin Date: Tue, 29 Oct 2024 08:54:31 +0800 Subject: [PATCH] add more example in eval doc Signed-off-by: Lantao Jin --- docs/ppl-lang/ppl-eval-command.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/ppl-lang/ppl-eval-command.md b/docs/ppl-lang/ppl-eval-command.md index cd0898c1b..1908c087c 100644 --- a/docs/ppl-lang/ppl-eval-command.md +++ b/docs/ppl-lang/ppl-eval-command.md @@ -80,6 +80,8 @@ Assumptions: `a`, `b`, `c` are existing fields in `table` - `source = table | eval f = case(a = 0, 'zero', a = 1, 'one', a = 2, 'two', a = 3, 'three', a = 4, 'four', a = 5, 'five', a = 6, 'six', a = 7, 'se7en', a = 8, 'eight', a = 9, 'nine')` - `source = table | eval f = case(a = 0, 'zero', a = 1, 'one' else 'unknown')` - `source = table | eval f = case(a = 0, 'zero', a = 1, 'one' else concat(a, ' is an incorrect binary digit'))` +- `source = table | eval f = a in ('foo', 'bar') | fields f` +- `source = table | eval f = a not in ('foo', 'bar') | fields f` Eval with `case` example: ```sql