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: content/en/logs/workspaces/sql_reference.md
+19-21
Original file line number
Diff line number
Diff line change
@@ -92,18 +92,18 @@ The following SQL functions are supported. For Window function, see the separate
92
92
|`trim(string s)`| string | Removes leading and trailing whitespace from the string. |
93
93
|`replace(string s, string from, string to)`| string | Replaces occurrences of a substring within a string with another substring. |
94
94
|`substring(string s, int start, int length)`| string | Extracts a substring from a string, starting at a given position and for a specified length. |
95
-
|`strpos(string s, string substring)`| integer | Returns the index position of the substring in a given string. |
96
-
|`split_part(string s, string delimiter, integer index)`| string | Splits the string on the given delimiter and returns the string as the given position counting from 1. |
95
+
|`strpos(string s, string substring)`| integer | Returns the first index position of the substring in a given string, or 0 if there is no match|
96
+
|`split_part(string s, string delimiter, integer index)`| string | Splits the string on the given delimiter and returns the string at the given position counting from one. |
97
97
|`extract(unit from timestamp/interval)`| numeric | Extracts a part of a date or time field (such as year or month) from a timestamp or interval. |
98
98
|`to_timestamp(string timestamp, string format)`| timestamp | Converts a string to a timestamp according to the given format. |
99
99
|`to_char(timestamp t, string format)`| string | Converts a timestamp to a string according to the given format. |
100
100
|`date_trunc(string unit, timestamp t)`| timestamp | Truncates a timestamp to a specified precision based on the provided unit. |
101
101
|`regexp_like(string s, pattern p)`| boolean | Evaluates if a string matches a regular expression pattern. |
102
-
|`cardinality(array a)`| integer | Returns the number of elements in the array, or 0 if the array is empty.|
103
-
|`array_position(array a, typeof_array value)`| integer | Returns the index of the first occurence of the value found in the array. |
102
+
|`cardinality(array a)`| integer | Returns the number of elements in the array. |
103
+
|`array_position(array a, typeof_array value)`| integer | Returns the index of the first occurrence of the value found in the array, or null if value is not found.|
104
104
|`string_to_array(string s, string delimiter)`| array of strings | Splits the given string into an array of strings using the given delimiter. |
105
-
|`array_agg(expression e)`| array of input type |Create an array by concatenating the input values. Ordering is not deterministic|
106
-
|`unnest(array a)`| type of array | Expands an array into a set of rows. |
105
+
|`array_agg(expression e)`| array of input type |Creates an array by collecting all the input values. |
106
+
|`unnest(array a [, array b...])`| type of array | Expands arrays into a set of rows. This form is only allowed in a FROM clause.|
0 commit comments