Overview

The following table lists the functions provided by DLI, such as decode1, javahash, and max_pt.

Table 1 Added functions

Syntax

Value Type

Description

decode1(<expression>, <search>, <result>[, <search>, <result>]...[, <default>])

Data type of the argument

Implements if-then-else branch selection.

javahash(string a)

STRING

Returns a hash value.

max_pt(<table_full_name>)

STRING

Returns the name of the largest level-1 partition that contains data in a partitioned table and reads the data of this partition.

ordinal(bigint <nth>, <var1>, <var2>[,...])

DOUBLE or DATETIME

Sorts input variables in ascending order and returns the value at the position specified by nth.

trans_array (<num_keys>, <separator>, <key1>,<key2>,…,<col1>,<col2>,<col3>) as (<key1>,<key2>,...,<col1>, <col2>)

Data type of the argument

Converts an array split by a fixed separator in a column into multiple rows.

trunc_numeric(<number>[, bigint<decimal_places>])

DOUBLE or DECIMAL

Truncates the number value to a specified decimal place.

url_decode(string <input>[, string <encoding>])

STRING

Converts a string from the application/x-www-form-urlencoded MIME format to regular characters.

url_encode(string <input>[, string <encoding>])

STRING

Encodes a string in the application/x-www-form-urlencoded MIME format.