tencent cloud

Stream Compute Service

Releases Notes and Announcements
Release Notes
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Billing Mode
Refund
Configuration Adjustments
Getting Started
Preparations
Creating a Private Cluster
Creating a SQL Job
Creating a JAR Job
Creating an ETL Job
Creating a Python Job
Operation Guide
Managing Jobs
Developing Jobs
Monitoring Jobs
Job Logs
Events and Diagnosis
Managing Metadata
Managing Checkpoints
Tuning Jobs
Managing Dependencies
Managing Clusters
Managing Permissions
SQL Developer Guide
Overview
Glossary and Data Types
DDL Statements
DML Statements
Merging MySQL CDC Sources
Connectors
SET Statement
Operators and Built-in Functions
Identifiers and Reserved Words
Python Developer Guide
ETL Developer Guide
Overview
Glossary
Connectors
FAQ
Contact Us

Other Functions

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 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.


Ajuda e Suporte

Esta página foi útil?

comentários