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/user/ppl/functions/condition.rst
+23-37Lines changed: 23 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ ISNULL
14
14
Description
15
15
>>>>>>>>>>>
16
16
17
-
Usage: isnull(field) return true if field is null.
17
+
Usage: isnull(field) returns true if field is null.
18
18
19
-
Argument type: all the supported data type.
19
+
Argument type: all the supported data types.
20
20
21
21
Return type: BOOLEAN
22
22
@@ -39,9 +39,9 @@ ISNOTNULL
39
39
Description
40
40
>>>>>>>>>>>
41
41
42
-
Usage: isnotnull(field) return true if field is not null.
42
+
Usage: isnotnull(field) returns true if field is not null.
43
43
44
-
Argument type: all the supported data type.
44
+
Argument type: all the supported data types.
45
45
46
46
Return type: BOOLEAN
47
47
@@ -60,7 +60,7 @@ Example::
60
60
EXISTS
61
61
------
62
62
63
-
`Because OpenSearch doesn't differentiate null and missing <https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html>`_. so we can't provide function like ismissing/isnotmissing to test field exist or not. But you can still use isnull/isnotnull for such purpose.
63
+
`Since OpenSearch doesn't differentiate null and missing <https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html>`_, we can't provide functions like ismissing/isnotmissing to test if a field exists or not. But you can still use isnull/isnotnull for such purpose.
64
64
65
65
Example, the account 13 doesn't have email field::
66
66
@@ -78,9 +78,9 @@ IFNULL
78
78
Description
79
79
>>>>>>>>>>>
80
80
81
-
Usage: ifnull(field1, field2) return field2 if field1 is null.
81
+
Usage: ifnull(field1, field2) returns field2 if field1 is null.
82
82
83
-
Argument type: all the supported data type, (NOTE : if two parameters has different type, you will fail semantic check.)
83
+
Argument type: all the supported data types (NOTE : if two parameters have different types, you will fail semantic check).
84
84
85
85
Return type: any
86
86
@@ -123,9 +123,9 @@ NULLIF
123
123
Description
124
124
>>>>>>>>>>>
125
125
126
-
Usage: nullif(field1, field2) return null if two parameters are same, otherwise return field1.
126
+
Usage: nullif(field1, field2) returns null if two parameters are same, otherwise returns field1.
127
127
128
-
Argument type: all the supported data type, (NOTE : if two parameters has different type, if two parameters has different type, you will fail semantic check)
128
+
Argument type: all the supported data types (NOTE : if two parameters have different types, you will fail semantic check).
129
129
130
130
Return type: any
131
131
@@ -149,9 +149,9 @@ ISNULL
149
149
Description
150
150
>>>>>>>>>>>
151
151
152
-
Usage: isnull(field1, field2) return null if two parameters are same, otherwise return field1.
152
+
Usage: isnull(field1, field2) returns null if two parameters are same, otherwise returns field1.
153
153
154
-
Argument type: all the supported data type
154
+
Argument type: all the supported data types.
155
155
156
156
Return type: any
157
157
@@ -174,9 +174,9 @@ IF
174
174
Description
175
175
>>>>>>>>>>>
176
176
177
-
Usage: if(condition, expr1, expr2) return expr1 if condition is true, otherwise return expr2.
177
+
Usage: if(condition, expr1, expr2) returns expr1 if condition is true, otherwise returns expr2.
178
178
179
-
Argument type: all the supported data type, (NOTE : if expr1 and expr2 are different type, you will fail semantic check
179
+
Argument type: all the supported data types (NOTE : if expr1 and expr2 are different types, you will fail semantic check).
180
180
181
181
Return type: any
182
182
@@ -221,9 +221,9 @@ CASE
221
221
Description
222
222
>>>>>>>>>>>
223
223
224
-
Usage: case(condition1, expr1, condition2, expr2, ... conditionN, exprN else default) return expr1 if condition1 is true, or return expr2 if condition2 is true, ... if no condition is true, then return the value of ELSE clause. If the ELSE clause is not defined, it returns NULL.
224
+
Usage: case(condition1, expr1, condition2, expr2, ... conditionN, exprN else default) returns expr1 if condition1 is true, or returns expr2 if condition2 is true, ... if no condition is true, then returns the value of ELSE clause. If the ELSE clause is not defined, returns NULL.
225
225
226
-
Argument type: all the supported data type, (NOTE : there is no comma before "else")
226
+
Argument type: all the supported data types (NOTE : there is no comma before "else").
227
227
228
228
Return type: any
229
229
@@ -266,11 +266,9 @@ COALESCE
266
266
Description
267
267
>>>>>>>>>>>
268
268
269
-
Version: 3.1.0
269
+
Usage: coalesce(field1, field2, ...) returns the first non-null, non-missing value in the argument list.
270
270
271
-
Usage: coalesce(field1, field2, ...) return the first non-null, non-missing value in the argument list.
272
-
273
-
Argument type: all the supported data type. Supports mixed data types with automatic type coercion.
271
+
Argument type: all the supported data types. Supports mixed data types with automatic type coercion.
274
272
275
273
Return type: determined by the least restrictive common type among all arguments, with fallback to string if no common type can be determined
276
274
@@ -364,11 +362,9 @@ ISPRESENT
364
362
Description
365
363
>>>>>>>>>>>
366
364
367
-
Version: 3.1.0
368
-
369
-
Usage: ispresent(field) return true if the field exists.
365
+
Usage: ispresent(field) returns true if the field exists.
370
366
371
-
Argument type: all the supported data type.
367
+
Argument type: all the supported data types.
372
368
373
369
Return type: BOOLEAN
374
370
@@ -392,11 +388,9 @@ ISBLANK
392
388
Description
393
389
>>>>>>>>>>>
394
390
395
-
Version: 3.1.0
396
-
397
391
Usage: isblank(field) returns true if the field is null, an empty string, or contains only white space.
398
392
399
-
Argument type: all the supported data type.
393
+
Argument type: all the supported data types.
400
394
401
395
Return type: BOOLEAN
402
396
@@ -420,11 +414,9 @@ ISEMPTY
420
414
Description
421
415
>>>>>>>>>>>
422
416
423
-
Version: 3.1.0
424
-
425
417
Usage: isempty(field) returns true if the field is null or is an empty string.
426
418
427
-
Argument type: all the supported data type.
419
+
Argument type: all the supported data types.
428
420
429
421
Return type: BOOLEAN
430
422
@@ -447,9 +439,7 @@ EARLIEST
447
439
Description
448
440
>>>>>>>>>>>
449
441
450
-
Version: 3.1.0
451
-
452
-
Usage: earliest(relative_string, field) returns true if the value of field is after the timestamp derived from relative_string relative to the current time. Otherwise, return false.
442
+
Usage: earliest(relative_string, field) returns true if the value of field is after the timestamp derived from relative_string relative to the current time. Otherwise, returns false.
453
443
454
444
relative_string:
455
445
The relative string can be one of the following formats:
@@ -503,9 +493,7 @@ LATEST
503
493
Description
504
494
>>>>>>>>>>>
505
495
506
-
Version: 3.1.0
507
-
508
-
Usage: latest(relative_string, field) returns true if the value of field is before the timestamp derived from relative_string relative to the current time. Otherwise, return false.
496
+
Usage: latest(relative_string, field) returns true if the value of field is before the timestamp derived from relative_string relative to the current time. Otherwise, returns false.
Usage: regex_match(string, pattern) returns true if the regular expression pattern finds a match against any substring of the string value, otherwise returns false.
541
527
542
528
The function uses Java regular expression syntax for the pattern.
Limitation: Only works when plugins.calcite.enabled=true
100
-
101
89
Usage: `json_array(element1, element2, ...)` create a json array string with elements.
102
90
103
91
Argument type: element1: ANY, element2: ANY ...
@@ -120,10 +108,6 @@ JSON_ARRAY_LENGTH
120
108
Description
121
109
>>>>>>>>>>>
122
110
123
-
Version: 3.1.0
124
-
125
-
Limitation: Only works when plugins.calcite.enabled=true
126
-
127
111
Usage: `json_array_length(value)` parse the string to json array and return size,, null is returned in case of any other valid JSON string, null or an invalid JSON.
128
112
129
113
Argument type: value: A JSON STRING
@@ -154,10 +138,6 @@ JSON_EXTRACT
154
138
Description
155
139
>>>>>>>>>>>
156
140
157
-
Version: 3.1.0
158
-
159
-
Limitation: Only works when plugins.calcite.enabled=true
160
-
161
141
Usage: `json_extract(json_string, path1, path2, ...)` Extracts values using the specified JSON paths. If only one path is provided, it returns a single value. If multiple paths are provided, it returns a JSON Array in the order of the paths. If one path cannot find value, return null as the result for this path. The path use "{<index>}" to represent index for array, "{}" means "{*}".
Limitation: Only works when plugins.calcite.enabled=true
194
-
195
171
Usage: `json_delete(json_string, path1, path2, ...)` Delete values using the specified JSON paths. Return the json string after deleting. If one path cannot find value, do nothing.
Limitation: Only works when plugins.calcite.enabled=true
236
-
237
209
Usage: `json_set(json_string, path1, value1, path2, value2...)` Set values to corresponding paths using the specified JSON paths. If one path's parent node is not a json object, skip the path. Return the json string after setting.
Limitation: Only works when plugins.calcite.enabled=true
270
-
271
239
Usage: `json_append(json_string, path1, value1, path2, value2...)` Append values to corresponding paths using the specified JSON paths. If one path's target node is not an array, skip the path. Return the json string after setting.
Limitation: Only works when plugins.calcite.enabled=true
312
-
313
277
Usage: `json_extend(json_string, path1, value1, path2, value2...)` Extend values to corresponding paths using the specified JSON paths. If one path's target node is not an array, skip the path. The function will try to parse the value as an array. If it can be parsed, extend it to the target array. Otherwise, regard the value a single one. Return the json string after setting.
Copy file name to clipboardExpand all lines: docs/user/ppl/functions/statistical.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Description
17
17
18
18
Usage: max(x, y, ...) returns the maximum value from all provided arguments. Strings are treated as greater than numbers, so if provided both strings and numbers, it will return the maximum string value (lexicographically ordered)
19
19
20
-
Note: This function is only available in the eval command context and requires Calcite engine to be enabled.
20
+
Note: This function is only available in the eval command context.
21
21
22
22
Argument type: Variable number of INTEGER/LONG/FLOAT/DOUBLE/STRING arguments
23
23
@@ -67,7 +67,7 @@ Description
67
67
68
68
Usage: min(x, y, ...) returns the minimum value from all provided arguments. Strings are treated as greater than numbers, so if provided both strings and numbers, it will return the minimum numeric value.
69
69
70
-
Note: This function is only available in the eval command context and requires Calcite engine to be enabled.
70
+
Note: This function is only available in the eval command context.
71
71
72
72
Argument type: Variable number of INTEGER/LONG/FLOAT/DOUBLE/STRING arguments
0 commit comments