# 标量函数类型Scalar function types

## 二进制函数Binary functions

binary_and()binary_and() 返回两个值的“按位与”运算的结果。Returns a result of the bitwise and operation between two values.
binary_not()binary_not() 返回输入值的“按位求反”结果。Returns a bitwise negation of the input value.
binary_or()binary_or() 返回两个值的“按位或”运算的结果。Returns a result of the bitwise or operation of the two values.
binary_shift_left()binary_shift_left() 返回针对一对数字的二进制左移运算：a << n。Returns binary shift left operation on a pair of numbers: a << n.
binary_shift_right()binary_shift_right() 返回针对一对数字的二进制右移运算：a >> n。Returns binary shift right operation on a pair of numbers: a >> n.
binary_xor()binary_xor() 返回两个值的“按位异或”运算的结果。Returns a result of the bitwise xor operation of the two values.
bitset_count_ones()bitset_count_ones() 返回数字的二进制表示形式中的设置位数。Returns the number of set bits in the binary representation of a number.

## 转换函数Conversion functions

tobool()tobool() 将输入转换为布尔值（带符号的 8 位）表示形式。Converts input to boolean (signed 8-bit) representation.
todatetime()todatetime() 将输入转换为日期/时间标量。Converts input to datetime scalar.
todouble()/toreal()todouble()/toreal() 将输入转换为类型为 real 的值。Converts the input to a value of type real. （todouble() 和 toreal() 是同义函数。）(todouble() and toreal() are synonyms.)
tostring()tostring() 将输入转换为字符串表示形式。Converts input to a string representation.
totimespan()totimespan() 将输入转换为时间跨度标量。Converts input to timespan scalar.

## 日期时间/时间跨度函数DateTime/timespan functions

ago()ago() 从当前 UTC 时钟时间减去给定时间跨度。Subtracts the given timespan from the current UTC clock time.
datetime_add()datetime_add() 计算新的日期时间，方法是将指定的日期部分与指定数量相乘，然后加上指定的日期时间。Calculates a new datetime from a specified datepart multiplied by a specified amount, added to a specified datetime.
datetime_part()datetime_part() 将所请求的日期部分提取为整数值。Extracts the requested date part as an integer value.
datetime_diff()datetime_diff() 返回包含日期的年份的终点，偏移某个偏移量（如已提供）。Returns the end of the year containing the date, shifted by an offset, if provided.
dayofmonth()dayofmonth() 返回一个整数，表示给定月份的第几天。Returns the integer number representing the day number of the given month.
dayofweek()dayofweek() 返回自上个星期日以来的整数天数，用作时间跨度。Returns the integer number of days since the preceding Sunday, as a timespan.
dayofyear()dayofyear() 返回一个整数，表示给定年份的第几天。Returns the integer number represents the day number of the given year.
endofday()endofday() 返回包含日期的一天的终点，偏移某个偏移量（如已提供）。Returns the end of the day containing the date, shifted by an offset, if provided.
endofmonth()endofmonth() 返回包含日期的月份的终点，偏移某个偏移量（如已提供）。Returns the end of the month containing the date, shifted by an offset, if provided.
endofweek()endofweek() 返回包含日期的周的终点，偏移某个偏移量（如已提供）。Returns the end of the week containing the date, shifted by an offset, if provided.
endofyear()endofyear() 返回包含日期的年份的终点，偏移某个偏移量（如已提供）。Returns the end of the year containing the date, shifted by an offset, if provided.
format_datetime()format_datetime() 基于格式模式参数设置某个日期时间参数的格式。Formats a datetime parameter based on the format pattern parameter.
format_timespan()format_timespan() 基于格式模式参数设置某个格式-时间跨度参数的格式。Formats a format-timespan parameter based on the format pattern parameter.
getmonth()getmonth() 从日期时间获取月份号 (1-12)。Get the month number (1-12) from a datetime.
getyear()getyear() 返回日期时间参数的年份部分。Returns the year part of the datetime argument.
hourofday()hourofday() 返回一个整数，表示给定日期中的第几个小时。Returns the integer number representing the hour number of the given date.
make_datetime()make_datetime() 根据指定的日期和时间创建一个日期时间标量值。Creates a datetime scalar value from the specified date and time.
make_timespan()make_timespan() 根据指定的时间段创建一个时间跨度标量值。Creates a timespan scalar value from the specified time period.
monthofyear()monthofyear() 返回一个整数，表示给定年份的第几个月。Returns the integer number represents the month number of the given year.
now()now() 返回当前的 UTC 时钟时间，偏移量取决于给定的时间跨度（可选）。Returns the current UTC clock time, optionally offset by a given timespan.
startofday()startofday() 返回包含日期的一天的起点，偏移某个偏移量（如已提供）。Returns the start of the day containing the date, shifted by an offset, if provided.
startofmonth()startofmonth() 返回包含日期的月份的起点，偏移某个偏移量（如已提供）。Returns the start of the month containing the date, shifted by an offset, if provided.
startofweek()startofweek() 返回包含日期的周的起点，偏移某个偏移量（如已提供）。Returns the start of the week containing the date, shifted by an offset, if provided.
startofyear()startofyear() 返回包含日期的年份的起点，偏移某个偏移量（如已提供）。Returns the start of the year containing the date, shifted by an offset, if provided.
todatetime()todatetime() 将输入转换为日期时间标量。Converts input to datetime scalar.
totimespan()totimespan() 将输入转换为时间跨度标量。Converts input to timespan scalar.
unixtime_microseconds_todatetime()unixtime_microseconds_todatetime() 将 unix-epoch 微秒转换为 UTC 日期/时间。Converts unix-epoch microseconds to UTC datetime.
unixtime_milliseconds_todatetime()unixtime_milliseconds_todatetime() 将 unix-epoch 毫秒转换为 UTC 日期/时间。Converts unix-epoch milliseconds to UTC datetime.
unixtime_nanoseconds_todatetime()unixtime_nanoseconds_todatetime() 将 unix-epoch 纳秒转换为 UTC 日期/时间。Converts unix-epoch nanoseconds to UTC datetime.
unixtime_seconds_todatetime()unixtime_seconds_todatetime() 将 unix-epoch 秒转换为 UTC 日期/时间。Converts unix-epoch seconds to UTC datetime.
weekofyear()weekofyear() 返回一个表示周数的整数。Returns an integer representing the week number.

## 动态/数组函数Dynamic/array functions

array_concat()array_concat() 将多个动态数组连接到单个数组。Concatenates a number of dynamic arrays to a single array.
array_iif()array_iif() 按元素对数组应用 iif 函数。Applies element-wise iif function on arrays.
array_index_of()array_index_of() 搜索指定项的数组，并返回其位置。Searches the array for the specified item, and returns its position.
array_length()array_length() 计算动态数组中的元素数。Calculates the number of elements in a dynamic array.
array_rotate_left()array_rotate_left() 将动态数组中的值向左旋转。Rotates values inside a dynamic array to the left.
array_rotate_right()array_rotate_right() 将动态数组中的值向右旋转。Rotates values inside a dynamic array to the right.
array_shift_left()array_shift_left() 将动态数组中的值向左移动。Shifts values inside a dynamic array to the left.
array_shift_right()array_shift_right() 将动态数组中的值向右移动。Shifts values inside a dynamic array to the right.
array_slice()array_slice() 提取动态数组的切片。Extracts a slice of a dynamic array.
array_sort_asc()array_sort_asc() 按升序对数组集合进行排序。Sorts a collection of arrays in ascending order.
array_sort_desc()array_sort_desc() 按降序对数组集合进行排序。Sorts a collection of arrays in descending order.
array_split()array_split() 生成从输入数组拆分的一个或多个数组。Builds an array of arrays split from the input array.
bag_keys()bag_keys() 枚举 dynamic 属性包对象中的所有根键。Enumerates all the root keys in a dynamic property-bag object.
bag_merge()bag_merge() 将多个 dynamic 属性包合并成一个包含所有属性的 dynamic 属性包。Merges dynamic property-bags into a dynamic property-bag with all properties merged.
bag_remove_keys()bag_remove_keys() 从 dynamic 属性包中删除键和关联的值。Removes keys and associated values from a dynamic property-bag.
pack()pack() 基于名称和值的列表创建一个动态对象（属性包）。Creates a dynamic object (property bag) from a list of names and values.
pack_all()pack_all() 基于表格表达式的所有列创建一个动态对象（属性包）。Creates a dynamic object (property bag) from all the columns of the tabular expression.
pack_array()pack_array() 将所有输入值打包为动态数组。Packs all input values into a dynamic array.
repeat()repeat() 生成包含一系列相等值的动态数组。Generates a dynamic array holding a series of equal values.
set_difference()set_difference() 返回一个数组，其中包含在第一个数组中但不在其他数组中的所有非重复值的集合。Returns an array of the set of all distinct values that are in the first array but aren't in other arrays.
set_has_element()set_has_element() 确定指定的数组中是否包含指定的元素。Determines whether the specified array contains the specified element.
set_intersect()set_intersect() 返回一个数组，其中包含所有数组中的所有非重复值的集合。Returns an array of the set of all distinct values that are in all arrays.
set_union()set_union() 返回一个数组，其中包含任何已提供的数组中的所有非重复值的集合。Returns an array of the set of all distinct values that are in any of provided arrays.
treepath()treepath() 枚举可标识动态对象中所有遗留内容的路径表达式。Enumerates all the path expressions that identify leaves in a dynamic object.
zip()zip() zip 函数接受任意数量的动态数组。The zip function accepts any number of dynamic arrays. 返回一个数组，其每个元素都是一个数组，后者包含同一索引的输入数组的元素。Returns an array whose elements are each an array with the elements of the input arrays of the same index.

## 窗口标量函数Window scalar functions

next()next() 对于序列化的行集，根据偏移量返回后一行中指定列的值。For the serialized row set, returns a value of a specified column from the later row according to the offset.
prev()prev() 对于序列化的行集，根据偏移量返回前一行中指定列的值。For the serialized row set, returns a value of a specified column from the earlier row according to the offset.
row_cumsum()row_cumsum() 计算列的累计和。Calculates the cumulative sum of a column.
row_number()row_number() 返回某个行在序列化行集（从给定索引开始的或默认从 1 开始的连续编号）中的编号。Returns a row's number in the serialized row set - consecutive numbers starting from a given index or from 1 by default.

## 流控制函数Flow control functions

toscalar()toscalar() 返回所计算的表达式的标量常数值。Returns a scalar constant value of the evaluated expression.

## 数学函数Mathematical functions

abs()abs() 计算输入的绝对值。Calculates the absolute value of the input.
acos()acos() 返回其余弦为指定数字的角度（cos() 的反运算）。Returns the angle whose cosine is the specified number (the inverse operation of cos()).
asin()asin() 返回其正弦为指定数字的角度（sin() 的反运算）。Returns the angle whose sine is the specified number (the inverse operation of sin()).
atan()atan() 返回其正切为指定数字的角度（tan() 的反运算）。Returns the angle whose tangent is the specified number (the inverse operation of tan()).
atan2()atan2() 计算正 x 轴与从原点到点 (y, x) 的射线之间的角度（以弧度表示）。Calculates the angle, in radians, between the positive x-axis and the ray from the origin to the point (y, x).
beta_cdf()beta_cdf() 返回标准的累积 beta 分布函数。Returns the standard cumulative beta distribution function.
beta_inv()beta_inv() 返回 beta 累积概率 beta 密度函数的反函数。Returns the inverse of the beta cumulative probability beta density function.
beta_pdf()beta_pdf() 返回概率密度 beta 函数。Returns the probability density beta function.
cos()cos() 返回余弦函数。Returns the cosine function.
cot()cot() 计算指定角度的三角函数余切（以弧度为单位）。Calculates the trigonometric cotangent of the specified angle, in radians.
degrees()degrees() 使用“度数 = (180/PI) * 弧度角度”这个公式，将以弧度表示的角度值转换为以度表示的值。Converts angle value in radians into value in degrees, using formula degrees = (180 / PI) * angle-in-radians.
exp()exp() x 的以 e 为底数的指数函数，表示 e 的 x 次幂：e^x。The base-e exponential function of x, which is e raised to the power x: e^x.
exp10()exp10() x 的以 10 为底数的指数函数，表示 10 的 x 次幂：10^x。The base-10 exponential function of x, which is 10 raised to the power x: 10^x.
exp2()exp2() x 的以 2 为底数的指数函数，表示 2 的 x 次幂：2^x。The base-2 exponential function of x, which is 2 raised to the power x: 2^x.
gamma()gamma() 计算 gamma 函数。Computes gamma function.
isfinite()isfinite() 返回输入是否为有限值（不是无限值或 NAN）。Returns whether input is a finite value (isn't infinite or NaN).
isinf()isinf() 返回输入是否为无限值（正值或负值）。Returns whether input is an infinite (positive or negative) value.
isnan()isnan() 返回输入是否为非数字 (NAN) 值。Returns whether input is Not-a-Number (NaN) value.
log()log() 返回自然对数函数。Returns the natural logarithm function.
log10()log10() 返回常用（以 10 为底数）对数函数。Returns the common (base-10) logarithm function.
log2()log2() 返回以 2 为底数的对数函数。Returns the base-2 logarithm function.
loggamma()loggamma() 计算 gamma 函数绝对值的对数。Computes log of absolute value of the gamma function.
not()not() 对其布尔参数的值取反。Reverses the value of its bool argument.
pi()pi() 返回 Pi (π) 的常数值。Returns the constant value of Pi (π).
pow()pow() 返回幂运算的结果。Returns a result of raising to power.
radians()radians() 使用“弧度 = (PI/180) * 角度”这个公式，将以度表示的角度值转换为以弧度表示的值。Converts angle value in degrees into value in radians, using formula radians = (PI / 180) * angle-in-degrees.
rand()rand() 返回一个随机数。Returns a random number.
range()range() 生成包含一系列等间距值的动态数组。Generates a dynamic array holding a series of equally spaced values.
round()round() 返回舍入到指定精度的源。Returns the rounded source to the specified precision.
sign()sign() 数值表达式的符号。Sign of a numeric expression.
sin()sin() 返回正弦函数。Returns the sine function.
sqrt()sqrt() 返回平方根函数。Returns the square root function.
tan()tan() 返回正切函数。Returns the tangent function.
welch_test()welch_test() 计算 Welch-test 函数的 p 值。Computes the p-value of the Welch-test function.

column_ifexists()column_ifexists() 采用列名作为字符串和默认值。Takes a column name as a string and a default value. 返回对列的引用（如果存在），否则返回默认值。Returns a reference to the column if it exists, otherwise - returns the default value.
current_cluster_endpoint()current_cluster_endpoint() 返回正在运行查询的当前群集。Returns the current cluster running the query.
current_database()current_database() 返回作用域中的数据库的名称。Returns the name of the database in scope.
current_principal()current_principal() 返回正在运行此查询的当前主体。Returns the current principal running this query.
current_principal_details()current_principal_details() 返回运行查询的主体的详细信息。Returns details of the principal running the query.
current_principal_is_member_of()current_principal_is_member_of() 检查运行查询的当前主体的组成员身份或主体标识。Checks group membership or principal identity of the current principal running the query.
cursor_after()cursor_after() 用于访问在游标的上一个值之后引入的记录。Used to access to the records that were ingested after the previous value of the cursor.
estimate_data_size()estimate_data_size() 返回表格表达式的选定列的估计数据大小。Returns an estimated data size of the selected columns of the tabular expression.
extent_id()extent_id() 返回标识当前记录所在的数据分片（“盘区”）的唯一标识符。Returns a unique identifier that identifies the data shard ("extent") that the current record resides in.
extent_tags()extent_tags() 返回一个动态数组，其中包含当前记录所在的数据分片（“盘区”）的标记。Returns a dynamic array with the tags of the data shard ("extent") that the current record resides in.
ingestion_time()ingestion_time() 检索记录的 \$IngestionTime 隐藏日期时间列，或返回 NULL。Retrieves the record's \$IngestionTime hidden datetime column, or null.

## 舍入函数Rounding functions

bin()bin() 将值向下舍入到给定 bin 大小的整数倍。Rounds values down to an integer multiple of a given bin size.
bin_at()bin_at() 将值向下舍入为固定大小的“bin”，并控制 bin 的起点。Rounds values down to a fixed-size "bin", with control over the bin's starting point. （另请参阅 bin 函数。）(See also bin function.)
ceiling()ceiling() 计算大于或等于指定数值表达式的最小整数。Calculates the smallest integer greater than, or equal to, the specified numeric expression.
floor()floor() 将值向下舍入到给定 bin 大小的整数倍。Rounds values down to an integer multiple of a given bin size.

## 条件函数Conditional functions

case()case() 计算谓词列表并返回其谓词满足条件的第一个结果表达式Evaluates a list of predicates and returns the first result expression whose predicate is satisfied.
coalesce()coalesce() 计算表达式列表，并返回第一个非 null（或非空，适用于字符串）表达式。Evaluates a list of expressions and returns the first non-null (or non-empty for string) expression.
iif()/iff()iif()/iff() 评估第一个参数（谓词）并返回第二个或第三个参数的值，具体取决于谓词评估结果为 true（第二个）还是为 false（第三个）。Evaluates the first argument (the predicate), and returns the value of either the second or third arguments, depending on whether the predicate evaluated to true (second) or false (third).
max_of()max_of() 返回所评估的几个数值表达式的最大值。Returns the maximum value of several evaluated numeric expressions.
min_of()min_of() 返回所评估的几个数值表达式的最小值。Returns the minimum value of several evaluated numeric expressions.

## 系列的按元素函数Series element-wise functions

series_divide()series_divide() 计算两个数值系列输入按元素相除的结果。Calculates the element-wise division of two numeric series inputs.
series_equals()series_equals() 计算两个数值系列输入的按元素等于 (`==`) 逻辑运算。Calculates the element-wise equals (`==`) logic operation of two numeric series inputs.
series_greater()series_greater() 计算两个数值系列输入的按元素大于(`>`) 逻辑运算。Calculates the element-wise greater (`>`) logic operation of two numeric series inputs.
series_greater_equals()series_greater_equals() 计算两个数值系列输入的按元素大于等于 (`>=`) 逻辑运算。Calculates the element-wise greater or equals (`>=`) logic operation of two numeric series inputs.
series_less()series_less() 计算两个数值系列输入的按元素小于 (`<`) 逻辑运算。Calculates the element-wise less (`<`) logic operation of two numeric series inputs.
series_less_equals()series_less_equals() 计算两个数值系列输入的按元素小于等于 (`<=`) 逻辑运算。Calculates the element-wise less or equal (`<=`) logic operation of two numeric series inputs.
series_multiply()series_multiply() 计算两个数值系列输入按元素相乘的结果。Calculates the element-wise multiplication of two numeric series inputs.
series_not_equals()series_not_equals() 计算两个数值系列输入的按元素不等于 (`!=`) 逻辑运算。Calculates the element-wise not equals (`!=`) logic operation of two numeric series inputs.
series_subtract()series_subtract() 计算两个数值系列输入按元素相减的结果。Calculates the element-wise subtraction of two numeric series inputs.

## 序列处理函数Series processing functions

series_decompose()series_decompose() 将系列分解为组件。Does a decomposition of the series into components.
series_decompose_anomalies()series_decompose_anomalies() 根据系列分解情况查找系列中的异常。Finds anomalies in a series based on series decomposition.
series_decompose_forecast()series_decompose_forecast() 根据系列分解情况进行预测。Forecast based on series decomposition.
series_fill_backward()series_fill_backward() 在系列中对缺失值执行后向填充内插。Performs backward fill interpolation of missing values in a series.
series_fill_const()series_fill_const() 用指定的常数值替换系列中缺失的值。Replaces missing values in a series with a specified constant value.
series_fill_forward()series_fill_forward() 在系列中对缺失值执行前向填充内插。Performs forward fill interpolation of missing values in a series.
series_fill_linear()series_fill_linear() 在系列中对缺失值执行线性内插。Performs linear interpolation of missing values in a series.
series_fft()series_fft() 对某个系列应用快速傅立叶变换 (FFT)。Applies the Fast Fourier Transform (FFT) on a series.
series_fir()series_fir() 对系列应用有限脉冲响应滤波器。Applies a Finite Impulse Response filter on a series.
series_fit_2lines()series_fit_2lines() 对系列应用两段线性回归，返回多个列。Applies two segments linear regression on a series, returning multiple columns.
series_fit_2lines_dynamic()series_fit_2lines_dynamic() 对系列应用两段线性回归，返回动态对象。Applies two segments linear regression on a series, returning dynamic object.
series_fit_line()series_fit_line() 对系列应用线性回归，返回多个列。Applies linear regression on a series, returning multiple columns.
series_fit_line_dynamic()series_fit_line_dynamic() 对系列应用线性回归，返回动态对象。Applies linear regression on a series, returning dynamic object.
series_fit_poly()series_fit_poly() 对系列应用多项式回归，返回多个列。Applies polynomial regression on a series, returning multiple columns.
series_ifft()series_ifft() 对系列应用快速傅立叶逆变换 (IFFT)。Applies the Inverse Fast Fourier Transform (IFFT) on a series.
series_iir()series_iir() 对系列应用无限脉冲响应滤波器。Applies an Infinite Impulse Response filter on a series.
series_outliers()series_outliers() 对系列中的异常点进行评分。Scores anomaly points in a series.
series_pearson_correlation()series_pearson_correlation() 计算两个系列的皮尔逊相关系数。Calculates the Pearson correlation coefficient of two series.
series_periods_detect()series_periods_detect() 找出一个时序中最重要的周期。Finds the most significant periods that exist in a time series.
series_periods_validate()series_periods_validate() 检查时序是否包含给定长度的定期模式。Checks whether a time series contains periodic patterns of given lengths.
series_seasonal()series_seasonal() 查找序列的季节性组件。Finds the seasonal component of the series.
series_stats()series_stats() 在多个列中返回系列的统计信息。Returns statistics for a series in multiple columns.
series_stats_dynamic()series_stats_dynamic() 在动态对象中返回系列的统计信息。Returns statistics for a series in dynamic object.

## 字符串函数String functions

base64_encode_tostring()base64_encode_tostring() 将字符串编码为 base64 字符串。Encodes a string as base64 string.
base64_decode_tostring()base64_decode_tostring() 将 base64 字符串解码为 UTF-8 字符串。Decodes a base64 string to a UTF-8 string.
base64_decode_toarray()base64_decode_toarray() 将 base64 字符串解码为长值的数组。Decodes a base64 string to an array of long values.
countof()countof() 计算字符串中子字符串的出现次数。Counts occurrences of a substring in a string. 纯字符串匹配项可能会重叠；正则表达式匹配项不会重叠。Plain string matches may overlap; regex matches don't.
extract()extract() 从文本字符串中获取正则表达式的匹配项。Get a match for a regular expression from a text string.
extract_all()extract_all() 从文本字符串中获取正则表达式的所有匹配项。Get all matches for a regular expression from a text string.
extractjson()extractjson() 使用路径表达式获取 JSON 文本外指定的元素。Get a specified element out of a JSON text using a path expression.
indexof()indexof() 函数会报告输入字符串中指定的字符串第一次出现时的索引（从零开始）。Function reports the zero-based index of the first occurrence of a specified string within input string.
isempty()isempty() 如果参数为空字符串或 null，则返回 true。Returns true if the argument is an empty string or is null.
isnotempty()isnotempty() 如果参数不为空字符串或 null，则返回 true。Returns true if the argument isn't an empty string or a null.
isnotnull()isnotnull() 如果参数不为 null，则返回 true。Returns true if the argument is not null.
isnull()isnull() 计算其唯一参数并返回一个布尔值，指示该参数的计算结果是否为 null 值。Evaluates its sole argument and returns a bool value indicating if the argument evaluates to a null value.
parse_command_line()parse_command_line() 分析 Unicode 命令行字符串并返回命令行参数的数组。Parses a Unicode command line string and returns an array of the command line arguments.
parse_csv()parse_csv() 拆分表示逗号分隔值的给定字符串，并返回包含这些值的字符串数组。Splits a given string representing comma-separated values and returns a string array with these values.
parse_ipv4()parse_ipv4() 将输入转换为 long（带符号的 64 位）数字表示形式。Converts input to long (signed 64-bit) number representation.
parse_ipv4_mask()parse_ipv4_mask() 将输入字符串和 IP 前缀掩码转换为 long（带符号的 64 位）数字表示形式。Converts input string and IP-prefix mask to long (signed 64-bit) number representation.
parse_ipv6()parse_ipv6() 将 IPv6 或 IPv4 字符串转换为规范的 IPv6 字符串表示形式。Converts IPv6 or IPv4 string to a canonical IPv6 string representation.
parse_ipv6_mask()parse_ipv6_mask() 将 IPv6 或 IPv4 字符串和网络掩码转换为规范的 IPv6 字符串表示形式。Converts IPv6 or IPv4 string and netmask to a canonical IPv6 string representation.
parse_json()parse_json() 将字符串解释为 JSON 值并返回动态值。Interprets a string as a JSON value) and returns the value as dynamic.
parse_url()parse_url() 分析绝对 URL 字符串并返回一个动态对象，其中包含 URL 的所有部分。Parses an absolute URL string and returns a dynamic object contains all parts of the URL.
parse_urlquery()parse_urlquery() 分析 URL 查询字符串并返回一个动态对象，其中包含查询参数。Parses a url query string and returns a dynamic object contains the Query parameters.
parse_version()parse_version() 将版本的输入字符串表示形式转换为可比较的十进制数字。Converts input string representation of version to a comparable decimal number.
replace()replace() 将所有正则表达式匹配项替换为其他字符串。Replace all regex matches with another string.
reverse()reverse() 此函数对输入字符串取反。Function makes reverse of input string.
split()split() 根据给定分隔符拆分给定字符串，并返回具有所包含子字符串的字符串数组。Splits a given string according to a given delimiter and returns a string array with the contained substrings.
strcat()strcat() 将 1 到 64 个参数连接起来。Concatenates between 1 and 64 arguments.
strcat_delim()strcat_delim() 将 2 到 64 个参数连接起来（分隔符作为第一个参数提供）。Concatenates between 2 and 64 arguments, with delimiter, provided as first argument.
strcmp()strcmp() 比较两个字符串。Compares two strings.
strlen()strlen() 返回输入字符串的长度（以字符为单位）。Returns the length, in characters, of the input string.
strrep()strrep() 按提供的次数（默认值为 1）重复给定的字符串。Repeats given string provided number of times (default - 1).
substring()substring() 从源字符串的某个索引开始到字符串结尾，提取子字符串。Extracts a substring from a source string starting from some index to the end of the string.
toupper()toupper() 将字符串转换为大写。Converts a string to upper case.
translate()translate() 将一组字符（“searchList”）替换为给定字符串中的另一组字符（“replacementList”）。Replaces a set of characters ('searchList') with another set of characters ('replacementList') in a given a string.
trim()trim() 删除指定的正则表达式的所有前导匹配项和尾随匹配项。Removes all leading and trailing matches of the specified regular expression.
trim_end()trim_end() 删除指定的正则表达式的尾随匹配项。Removes trailing match of the specified regular expression.
trim_start()trim_start() 删除指定的正则表达式的前导匹配项。Removes leading match of the specified regular expression.
url_decode()url_decode() 此函数将编码的 URL 转换为常规 URL 表示形式。The function converts encoded URL into a regular URL representation.
url_encode()url_encode() 此函数将输入 URL 的字符转换为可通过 Internet 传输的格式。The function converts characters of the input URL into a format that can be transmitted over the Internet.

## IPv4/IPv6 函数IPv4/IPv6 functions

ipv4_compare()ipv4_compare() 比较两个 IPv4 字符串。Compares two IPv4 strings.
ipv4_is_match()ipv4_is_match() 匹配两个 IPv4 字符串。Matches two IPv4 strings.
parse_ipv4()parse_ipv4() 将输入字符串转换为 long（带符号的 64 位）数字表示形式。Converts input string to long (signed 64-bit) number representation.
parse_ipv4_mask()parse_ipv4_mask() 将输入字符串和 IP 前缀掩码转换为 long（带符号的 64 位）数字表示形式。Converts input string and IP-prefix mask to long (signed 64-bit) number representation.
ipv6_compare()ipv6_compare() 对两个 IPv4 或 IPv6 字符串进行比较。Compares two IPv4 or IPv6 strings.
ipv6_is_match()ipv6_is_match() 对两个 IPv4 或 IPv6 字符串进行匹配。Matches two IPv4 or IPv6 strings.
parse_ipv6()parse_ipv6() 将 IPv6 或 IPv4 字符串转换为规范的 IPv6 字符串表示形式。Converts IPv6 or IPv4 string to a canonical IPv6 string representation.
parse_ipv6_mask()parse_ipv6_mask() 将 IPv6 或 IPv4 字符串和网络掩码转换为规范的 IPv6 字符串表示形式。Converts IPv6 or IPv4 string and netmask to a canonical IPv6 string representation.
format_ipv4()format_ipv4() 使用网络掩码分析输入，并返回表示 IPv4 地址的字符串。Parses input with a netmask and returns string representing IPv4 address.

## 类型函数Type functions

gettype()gettype() 返回其单个参数的运行时类型。Returns the runtime type of its single argument.

## 标量聚合函数Scalar aggregation functions

dcount_hll()dcount_hll() 根据 hll 结果（由 hll 或 hll-merge 生成的）计算 dcount。Calculates the dcount from hll results (which was generated by hll or hll-merge).
hll_merge()hll_merge() 合并 hll 结果（聚合版 hll-merge() 的标量版本）。Merges hll results (scalar version of the aggregate version hll-merge()).
percentile_tdigest()percentile_tdigest() 根据 tdigest 结果（由 tdigest 或 merge-tdigests 生成的）计算百分比结果。Calculates the percentile result from tdigest results (which was generated by tdigest or merge-tdigests).
percentrank_tdigest()percentrank_tdigest() 计算数据集中某个值的百分比排名。Calculates the percentage ranking of a value in a dataset.
rank_tdigest()rank_tdigest() 计算集中某个值的相对排名。Calculates relative rank of a value in a set.
tdigest_merge()tdigest_merge() 合并 tdigest 结果（聚合版 tdigest-merge() 的标量版本）。Merges tdigest results (scalar version of the aggregate version tdigest-merge()).

## 地理空间函数Geospatial functions

geo_distance_2points()geo_distance_2points() 计算地球上两个地理空间坐标之间的最短距离。Calculates the shortest distance between two geospatial coordinates on Earth.
geo_distance_point_to_line()geo_distance_point_to_line() 计算地球上坐标和直线之间的最短距离。Calculates the shortest distance between a coordinate and a line on Earth.
geo_point_in_circle()geo_point_in_circle() 计算地理空间坐标是否在地球上的某个圆圈范围内。Calculates whether the geospatial coordinates are inside a circle on Earth.
geo_point_in_polygon()geo_point_in_polygon() 计算地理空间坐标是否在地球上的某个多边形或多多边形内。Calculates whether the geospatial coordinates are inside a polygon or a multipolygon on Earth.
geo_point_to_geohash()geo_point_to_geohash() 计算地理位置的 Geohash 字符串值。Calculates the Geohash string value for a geographic location.
geo_geohash_to_central_point()geo_geohash_to_central_point() 计算表示 Geohash 矩形区中心的地理空间坐标。Calculates the geospatial coordinates that represent the center of a Geohash rectangular area.
geo_point_to_s2cell()geo_point_to_s2cell() 计算地理位置的 S2 单元格字符串值。Calculates the S2 cell token string value for a geographic location.
geo_s2cell_to_central_point()geo_s2cell_to_central_point() 计算表示 S2 单元格中心的地理空间坐标。Calculates the geospatial coordinates that represent the center of an S2 cell.
geo_polygon_to_s2cells()geo_polygon_to_s2cells() 计算覆盖地球上的多边形或多多边形的 S2 单元标记。Calculates S2 cell tokens that cover a polygon or multipolygon on Earth. 有用的地理空间联接工具。Useful geospatial join tool.
geo_line_densify()geo_line_densify() 通过添加中间点将平面线边缘转换为测地线。Converts planar line edges to geodesics by adding intermediate points.
geo_polygon_densify()geo_polygon_densify() 通过添加中间点将多边形或多边形集合的平面边缘转换为测地线。Converts polygon or multipolygon planar edges to geodesics by adding intermediate points.

## 哈希函数Hash functions

hash()hash() 返回输入值的哈希值。Returns a hash value for the input value.
hash_combine()hash_combine() 将两个或更多个哈希值组合起来。Combines two or more hash values.
hash_many()hash_many() 返回多个值的组合哈希值。Returns a combined hash value of multiple values.
hash_md5()hash_md5() 返回输入值的 MD5 哈希值。Returns a MD5 hash value for the input value.
hash_sha256()hash_sha256() 返回输入值的 SHA256 哈希值。Returns a SHA256 hash value for the input value.