MaxCompute - Provides New Built-in Functions or Enhances Existing Built-in Functions in MaxCompute SQL
Aug 31 2021MaxCompute
Target customers: developers and analysts. Features released: MaxCompute SQL provides new built-in functions or enhances existing built-in functions. The following functions are included: 1. Complex type functions: FIELD: gets the values of member variables in STRUCT data. 2. Date functions: TO_MILLIS: converts a specific date to a UNIX timestamp in milliseconds. 3. String functions: ENCODE: encodes a string in a specific encoding format. FIND_IN_SET: returns the position of a specific string among strings that are separated by commas (,). LOCATE: returns the position of a specific string within another string. PARSE_URL_TUPLE: parses a specific URL and returns multiple parts of the URL. 4. Mathematical functions: Corr: calculates the Pearson correlation coefficient for two columns of data. 5. Other functions: HASH: hashes input parameters and returns a hash value. COMPRESS: compresses an input string by using the gzip algorithm. DECOMPRESS: decompresses input data of a binary data type by using the gzip algorithm. NULLIF: returns NULL if two specific expressions are equal and returns the first expression if the two expressions are not equal. FORMAT_NUMBER: converts numbers to strings in a specific format. SHA: uses SHA-1 to calculate the hash value of data of a string or binary data type and returns the value as a hexadecimal string. SHA1: uses SHA-1 to calculate the hash value of data of a string or binary data type and returns the value as a hexadecimal string. SHA2: uses an algorithm of the SHA-2 family to calculate the hash value of data of a string or binary data type. SHA-224, SHA-256, SHA-384, and SHA-512 are supported. CRC32: calculates the cyclic redundancy check value of data of a string or binary data type.