tencent cloud

All product documents
Stream Compute Service
Other Functions
Last updated: 2023-11-08 11:31:56
Other Functions
Last updated: 2023-11-08 11:31:56

Hash functions

Hash functions are described as follows:
Function
Description
MD5(string)
Returns the MD5 hash (a string of 32 hexadecimal digits) of string. Returns NULL if string is NULL.
SHA1(string)
Returns the SHA-1 hash (a string of 40 hexadecimal digits) of string. Returns NULL if string is NULL.
SHA256(string)
Returns the SHA-256 hash (a string of 64 hexadecimal digits) of string. Returns NULL if string is NULL.
SHA224(string)
Returns the SHA-224 hash (a string of 56 hexadecimal digits) of string. Returns NULL if string is NULL.
SHA384(string)
Returns the SHA-384 hash (a string of 96 hexadecimal digits) of string. Returns NULL if string is NULL.
SHA512(string)
Returns the SHA-512 hash (a string of 128 hexadecimal digits) of string. Returns NULL if string is NULL.
SHA2(string, hashLength)
Returns the hash of string using the SHA-2 family of hash functions. For example, when hashLength is 256, it is equivalent to SHA256(string).

Value access functions

Value access functions are described as follows:
Function
Description
tableName.compositeType.field
Returns the value of a field from a composite type (e.g., Tuple, POJO) by name.
tableName.compositeType.*
Returns the values of all fields from a composite type (e.g., Tuple, POJO).

Value construction functions

Value construction functions are described as follows:
Function
Description
(value, [, value]*)
ROW(value, [, value]*)
Returns a row created from a list of values. The two expressions are equivalent.
ARRAY '[' value [, value ] * ']'
Returns an array created from a list of values.
MAP '[' key, value [, key, value ] * ']'
Returns a map created from a list of key-value pairs.

Collection functions

Collection functions include array and map operations and are described as follows:
Function
Description
CARDINALITY(array)
Returns the number of elements in array.
array '[' index ']'
Returns the element at position index in array. The index starts from 1.
ELEMENT(array)
Returns the sole element of array (whose cardinality should be one). Returns NULL if array is left empty. Throws an exception if array has more than one element.
CARDINALITY(map)
Returns the number of entries in map.
map '[' key ']'
Returns the value specified by key value in map.

Grouping functions

Grouping functions are used to represent the results of a GROUP BY grouping. They are described as follows:
Function
Description
GROUP_ID()
Returns an integer that uniquely identifies the combination of grouping keys.
GROUPING(expression1 [, expression2]* )
GROUPING_ID(expression1 [, expression2]* )
Returns the group ID (a bit vector) of the given grouping expressions.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon