| Return type |
Function |
Description |
| Int |
Length (string) |
Returns the length of a string. |
| String |
Reverse (string) |
Returns an inverted string. |
| String |
Concat (string a, string B ...) |
Concatenates multiple strings and combines them into one string, which can accept any number of input strings. |
| String |
Concat_ws (string SEP, string a, string B ...) |
Links multiple strings separated by the specified separator. |
| String |
Substr (string a, int start) substring (string a, int start) |
The character after the specified start position in the text string. |
| String |
Substr (string a, int start, int Len) substring (string a, int start, int Len) |
Specifies the length of characters from the specified position in the text string. |
| String |
Upper (string a) ucase (string) |
Convert text strings into uppercase letters |
| String |
Lower (string a) lcase (string) |
Converts a text string to lowercase letters. |
| String |
Trim (string) |
Delete the spaces at both ends of the string. the spaces between characters are retained. |
| String |
Ltrim (string) |
Removes spaces on the left of the string. Other spaces are retained. |
| String |
Rtrim (string) |
Removes spaces on the right of a string. Other spaces are retained. |
| String |
Regexp_replace (string a, string B, string C) |
The B character in string a is replaced by the C character |
| String |
Regexp_extract (string subject, string pattern, int index) |
Returns the part specified by the regular expression by subscript. Regexp_extract ('foothebar', 'foo (.*?) (Bar) ', 2) returns 'bar .' |
| String |
Parse_url (string urlstring, string parttoextract [, string keytoextract]) |
Returns the part specified by the URL. Parse_url ('HTTP: // facebook.com/path1/p.php? K1 = V1 & k2 = v2 # ref1 ', 'host') Return: 'Facebook. com' |
| String |
Get_json_object (string json_string, string path) |
Select a. timestamp, get_json_object (A. appevents, '$. eventid'), get_json_object (A. appenvets,' $. eventname') from log; |
| String |
Space (int n) |
Returns a specified number of spaces. |
| String |
Repeat (string STR, int N) |
Repeat strings for n times |
| Int |
ASCII (string Str) |
Returns the number of the first character in the string. |
| String |
Lpad (string STR, int Len, string pad) |
Returns a string of the specified length. When the length of a given string is smaller than the specified length, the specified character is filled from the left. |
| String |
Rpad (string STR, int Len, string pad) |
Returns a string of the specified length. When the length of a given string is smaller than the specified length, the specified character is filled from the right side. |
| Array |
Split (string STR, string Pat) |
Converts a string to an array. |
| Int |
Find_in_set (string STR, string strlist) |
Returns the position where STR appears in strlist for the first time. If any parameter is null, null is returned. If the first parameter contains a comma, 0 is returned. |
| Array <array <string> |
Sentences (string STR, string Lang, string locale) |
Groups the content of a string by statement. Each word is separated by commas and an array is returned. For example, sentences ('Hello there! How are you? ') Return :( ("hello", "there"), ("how", "are", "you ")) |
| Array <struct <string, double> |
Ngrams (array <string>, int N, int K, int PF) |
Select ngrams (sentences (lower (Tweet), 2,100 [, 1000]) from Twitter; |
| Array <struct <string, double> |
Context_ngrams (array <string>, array <string>, int K, int PF) |
Select context_ngrams (sentences (lower (Tweet), array (null, null), 100, [, 1000]) from Twitter; |