Skip to content

Commit 52f9163

Browse files
authored
fix(ibis): refactor the available function list (#1112)
1 parent 7ffae19 commit 52f9163

31 files changed

+1086
-909
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,22 @@
11
function_type,name,return_type,param_names,param_types,description
2-
aggregate,countif,int,,boolean,"Counts the rows where a condition is true."
3-
aggregate,corr,float,,"float,float","Calculates the correlation coefficient of a set of numbers."
4-
aggregate,covar_pop,float,,"float,float","Calculates the population covariance of a set of numbers."
5-
aggregate,covar_samp,float,,"float,float","Calculates the sample covariance of a set of numbers."
6-
aggregate,stddev_pop,float,,"float","Calculates the population standard deviation of a set of numbers."
7-
aggregate,stddev_samp,float,,"float","Calculates the sample standard deviation of a set of numbers."
8-
aggregate,var_pop,float,,"float","Calculates the population variance of a set of numbers."
9-
aggregate,bit_and,int,,"int","Returns the bitwise AND of non-NULL input values."
10-
aggregate,bit_or,int,,"int","Returns the bitwise OR of non-NULL input values."
11-
aggregate,bit_xor,int,,"int","Returns the bitwise XOR of non-NULL input values."
12-
aggregate,any_value,any,,"any","Returns any arbitrary value from the input values."
13-
aggregate,array_agg,array,,"any","Aggregates values into an array."
14-
aggregate,string_agg,text,,"text,text","Aggregates string values with a delimiter."
15-
aggregate,count,int,,"any","Counts the number of rows."
16-
aggregate,max,any,,"any","Returns the maximum value."
17-
aggregate,min,any,,"any","Returns the minimum value."
18-
aggregate,sum,any,,"any","Returns the sum of values."
19-
aggregate,avg,float,,"int","Returns the average of values."
20-
scalar,acos,float,,"float","Returns the arccosine of a number."
21-
scalar,asin,float,,"float","Returns the arcsine of a number."
22-
scalar,atan,float,,"float","Returns the arctangent of a number."
23-
scalar,atan2,float,,"float,float","Returns the arctangent of two numbers."
24-
scalar,cos,float,,"float","Returns the cosine of a number."
25-
scalar,cosh,float,,"float","Returns the hyperbolic cosine of a number."
26-
scalar,sin,float,,"float","Returns the sine of a number."
27-
scalar,sinh,float,,"float","Returns the hyperbolic sine of a number."
28-
scalar,tan,float,,"float","Returns the tangent of a number."
29-
scalar,tanh,float,,"float","Returns the hyperbolic tangent of a number."
30-
scalar,greatest,any,,"any","Returns the greatest value in a list of expressions."
31-
scalar,least,any,,"any","Returns the least value in a list of expressions."
2+
aggregate,countif,int64,,boolean,"Counts the rows where a condition is true."
3+
aggregate,any_value,same_as_input,,"any","Returns any arbitrary value from the input values."
324
scalar,format,text,,"text","Formats values into a string."
33-
scalar,lpad,text,,"text,int","Pads a string on the left to a certain length."
34-
scalar,rpad,text,,"text,int","Pads a string on the right to a certain length."
35-
scalar,left,text,,"text,int","Returns a substring from the beginning of a string."
36-
scalar,right,text,,"text,int","Returns a substring from the end of a string."
37-
scalar,array_length,int,,"array","Returns the length of an array."
38-
scalar,array_reverse,array,,"array","Reverses the elements in an array."
39-
scalar,array_concat,array,,"array,array","Concatenates multiple arrays into one."
40-
scalar,array_to_string,text,,"array<string>,text","Converts an array to a single string."
415
scalar,safe_divide,float,,"float,float","Divides two numbers, returning NULL if the divisor is zero."
426
scalar,safe_multiply,float,,"float,float","Multiplies two numbers, returning NULL if an overflow occurs."
437
scalar,safe_add,float,,"float,float","Adds two numbers, returning NULL if an overflow occurs."
448
scalar,safe_subtract,float,,"float,float","Subtracts two numbers, returning NULL if an overflow occurs."
45-
scalar,abs,float,,"float","Returns the absolute value of a number."
46-
scalar,floor,int,,"float","Rounds down to the nearest integer."
47-
scalar,current_date,date,,"","Returns the current date."
489
scalar,current_datetime,timestamp,,"","Returns current date and time."
49-
scalar,date_add,date,,"date,int","Adds a number of day to a date."
10+
scalar,date_add,date,,"date,int64","Adds a number of day to a date."
5011
scalar,date_sub,date,,"date,interval","Subtracts a specified interval from a date."
51-
scalar,date_diff,int,,"date,date,granularity","Returns the difference between two dates."
52-
scalar,date_trunc,date,,"date,granularity","Truncates a date to a specified granularity."
12+
scalar,date_diff,int64,,"date,date,granularity","Returns the difference between two dates."
5313
scalar,timestamp_add,timestamp,,"timestamp,granularity","Adds a specified interval to a timestamp."
5414
scalar,timestamp_sub,timestamp,,"timestamp,granularity","Subtracts a specified interval from a timestamp."
55-
scalar,timestamp_diff,int,,"timestamp,timestamp,granularity","Returns the difference between two timestamps."
15+
scalar,timestamp_diff,int64,,"timestamp,timestamp,granularity","Returns the difference between two timestamps."
5616
scalar,timestamp_trunc,timestamp,,"timestamp,granularity","Truncates a timestamp to a specified granularity."
57-
scalar,timestamp_micros,timestamp,,"int","Converts the number of microseconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP."
58-
scalar,timestamp_millis,timestamp,,"int","Converts the number of milliseconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP."
59-
scalar,timestamp_seconds,timestamp,,"int","Converts the number of seconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP."
17+
scalar,timestamp_micros,timestamp,,"int64","Converts the number of microseconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP."
18+
scalar,timestamp_millis,timestamp,,"int64","Converts the number of milliseconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP."
19+
scalar,timestamp_seconds,timestamp,,"int64","Converts the number of seconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP."
6020
scalar,format_date,string,,"string,date","Formats a date according to the specified format string."
6121
scalar,format_timestamp,string,,"string,timestamp","Formats a timestamp according to the specified format string."
6222
scalar,parse_date,date,,"text,text","Parses a date from a string."
@@ -67,14 +27,9 @@ scalar,json_query_array,array,,"json,text","Extracts a JSON array from a JSON st
6727
scalar,json_value_array,array,,"json,text","Extracts an array of scalar JSON values as strings."
6828
scalar,lax_bool,boolean,,"any","Converts a value to boolean with relaxed type checking."
6929
scalar,lax_float64,float,,"any","Converts a value to float with relaxed type checking."
70-
scalar,lax_int64,int,,"any","Converts a value to int with relaxed type checking."
30+
scalar,lax_int64,int64,,"any","Converts a value to int with relaxed type checking."
7131
scalar,lax_string,text,,"any","Converts a value to text with relaxed type checking."
7232
scalar,bool,boolean,,"any","Converts a JSON value to SQL boolean type."
7333
scalar,float64,float,,"any","Converts a JSON value to SQL float type."
74-
scalar,int64,int,,"any","Converts a JSON value to SQL int type."
34+
scalar,int64,int64,,"any","Converts a JSON value to SQL int type."
7535
scalar,string,text,,"any","Converts a JSON value to SQL text type."
76-
window,cume_dist,float,,"","Gets the cumulative distribution (relative position (0,1]) of each row within a window."
77-
window,dense_rank,int,,"","Gets the dense rank (1-based, no gaps) of each row within a window."
78-
window,percent_rank,float,,"","Gets the percentile rank (from 0 to 1) of each row within a window."
79-
window,rank,int,,"","Gets the rank (1-based) of each row within a window."
80-
window,row_number,int,,"","Gets the sequential row number (1-based) of each row within a window."
+31-86
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,31 @@
1-
function_type,name,return_type,description
2-
aggregate,approx_percentile,same as input,"Approximates percentile"
3-
aggregate,approximate_distinct,bigint,"Approximates count of distinct values"
4-
aggregate,array_agg,array,"Aggregates values into array"
5-
aggregate,avg,double,"Returns average of values"
6-
aggregate,corr,double,"Returns correlation coefficient"
7-
aggregate,count,bigint,"Counts number of rows"
8-
aggregate,covar_samp,double,"Returns sample covariance"
9-
aggregate,map_agg,map,"Aggregates key/value pairs into map"
10-
aggregate,max,same as input,"Returns maximum value"
11-
aggregate,min,same as input,"Returns minimum value"
12-
aggregate,regr_intercept,double,"Returns linear regression intercept"
13-
aggregate,regr_slope,double,"Returns linear regression slope"
14-
aggregate,string_agg,varchar,"Concatenates strings with delimiter"
15-
aggregate,sum,numeric,"Returns sum of values"
16-
scalar,abs,double,"Returns absolute value of the argument"
17-
scalar,array_distinct,array,"Removes duplicate values from array"
18-
scalar,array_join,varchar,"Joins array elements with delimiter"
19-
scalar,array_sort,array,"Sorts array elements"
20-
scalar,cardinality,bigint,"Returns size of array or map"
21-
scalar,cbrt,double,"Returns cube root of the argument"
22-
scalar,ceil,double,"Rounds up to nearest integer"
23-
scalar,concat,varchar,"Concatenates given strings"
24-
scalar,contains,boolean,"Checks if array contains element"
25-
scalar,current_date,date,"Returns current date"
26-
scalar,date_add,date,"Adds interval to date"
27-
scalar,date_sub,date,"Subtracts interval from date"
28-
scalar,date_trunc,timestamp,"Truncates timestamp to specified precision"
29-
scalar,element_at,any,"Returns element at specified position in array"
30-
scalar,filter,array,"Filters array using lambda"
31-
scalar,floor,double,"Rounds down to nearest integer"
32-
scalar,format_datetime,varchar,"Formats datetime according to format string"
33-
scalar,from_base64,varbinary,"Converts base64 to binary"
34-
scalar,from_hex,varbinary,"Converts hex string to binary"
35-
scalar,from_unixtime,timestamp,"Converts unix timestamp to timestamp"
36-
scalar,hamming_distance,bigint,"Calculates Hamming distance"
37-
scalar,is_finite,boolean,"Tests if value is finite"
38-
scalar,is_infinite,boolean,"Tests if value is infinite"
39-
scalar,is_nan,boolean,"Tests if value is NaN"
40-
scalar,json_extract,json,"Extracts JSON by JSONPath"
41-
scalar,json_format,varchar,"Pretty prints JSON"
42-
scalar,json_parse,json,"Parses string as JSON"
43-
scalar,length,bigint,"Returns length of string"
44-
scalar,levenshtein_distance,bigint,"Calculates Levenshtein distance"
45-
scalar,lower,varchar,"Converts string to lowercase"
46-
scalar,map_concat,map,"Concatenates two maps"
47-
scalar,map_keys,array,"Returns array of map keys"
48-
scalar,map_values,array,"Returns array of map values"
49-
scalar,md5,varchar,"Computes MD5 hash"
50-
scalar,parse_datetime,timestamp,"Parses string to datetime using format"
51-
scalar,reduce,any,"Reduces array to single value using lambda"
52-
scalar,regexp_extract,varchar,"Extracts substring using regex"
53-
scalar,regexp_like,boolean,"Tests if string matches regex"
54-
scalar,regexp_replace,varchar,"Replaces substring using regex"
55-
scalar,replace,varchar,"Replaces substring in string"
56-
scalar,round,double,"Rounds to nearest integer or decimal places"
57-
scalar,sha256,varchar,"Computes SHA256 hash"
58-
scalar,split,array,"Splits string by delimiter into array"
59-
scalar,split_part,varchar,"Returns specific part from split string"
60-
scalar,strpos,bigint,"Returns position of substring"
61-
scalar,substr,varchar,"Extracts substring from string"
62-
scalar,to_base64,varchar,"Converts binary to base64"
63-
scalar,to_hex,varchar,"Converts number to hex string"
64-
scalar,to_unixtime,double,"Converts timestamp to unix timestamp"
65-
scalar,transform,array,"Applies lambda to each element"
66-
scalar,trim,varchar,"Removes leading and trailing whitespace"
67-
scalar,try,same as input,"Returns null if evaluation fails"
68-
scalar,upper,varchar,"Converts string to uppercase"
69-
scalar,url_decode,varchar,"Decodes URL encoded string"
70-
scalar,url_encode,varchar,"URL encodes string"
71-
scalar,uuid,varchar,"Generates random UUID"
72-
scalar,word_stem,varchar,"Returns word stem (English only)"
73-
scalar,xxhash64,bigint,"Computes xxHash64 hash"
74-
scalar,zip_with,array,"Combines two arrays using lambda"
75-
window,cume_dist,double,"Returns cumulative distribution"
76-
window,dense_rank,bigint,"Returns rank without gaps"
77-
window,first_value,any,"Returns first value in window"
78-
window,lag,any,"Returns value from previous row"
79-
window,last_value,any,"Returns last value in window"
80-
window,lead,any,"Returns value from following row"
81-
window,nth_value,any,"Returns nth value in window"
82-
window,nth_value,any,"Returns value at specified row"
83-
window,ntile,bigint,"Divides rows into buckets"
84-
window,percent_rank,double,"Returns percent rank of row"
85-
window,rank,bigint,"Returns rank with gaps"
86-
window,row_number,bigint,"Returns sequential row number"
1+
function_type,name,return_type,param_names,param_types,description
2+
aggregate,approx_percentile,same_as_input,,,"Approximates percentile"
3+
aggregate,approximate_distinct,bigint,,,"Approximates count of distinct values"
4+
aggregate,regr_slope,double,,,"Returns linear regression slope"
5+
scalar,date_add,date,,,"Adds interval to date"
6+
scalar,date_sub,date,,,"Subtracts interval from date"
7+
scalar,filter,same_as_input,,,"Filters array using lambda"
8+
scalar,format_datetime,varchar,,,"Formats datetime according to format string"
9+
scalar,from_base64,varbinary,,,"Converts base64 to binary"
10+
scalar,from_hex,varbinary,,,"Converts hex string to binary"
11+
scalar,hamming_distance,bigint,,,"Calculates Hamming distance"
12+
scalar,is_finite,boolean,,,"Tests if value is finite"
13+
scalar,is_infinite,boolean,,,"Tests if value is infinite"
14+
scalar,is_nan,boolean,,,"Tests if value is NaN"
15+
scalar,json_extract,json,,,"Extracts JSON by JSONPath"
16+
scalar,json_format,varchar,,,"Pretty prints JSON"
17+
scalar,json_parse,json,,,"Parses string as JSON"
18+
scalar,levenshtein_distance,bigint,,,"Calculates Levenshtein distance"
19+
scalar,parse_datetime,timestamp,,,"Parses string to datetime using format"
20+
scalar,reduce,same_as_input,,,"Reduces array to single value using lambda"
21+
scalar,regexp_extract,varchar,,,"Extracts substring using regex"
22+
scalar,split,array<string>,,,"Splits string by delimiter into array"
23+
scalar,to_base64,varchar,,,"Converts binary to base64"
24+
scalar,transform,same_as_input,,,"Applies lambda to each element"
25+
scalar,try,same_as_input,,,"Returns null if evaluation fails"
26+
scalar,url_decode,varchar,,,"Decodes URL encoded string"
27+
scalar,url_encode,varchar,,,"URL encodes string"
28+
scalar,word_stem,varchar,,,"Returns word stem (English only)"
29+
scalar,xxhash64,bigint,,,"Computes xxHash64 hash"
30+
scalar,zip_with,array,,,"Combines two arrays using lambda"
31+
window,lead,any,,,"Returns value from following row"
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11
function_type,name,return_type,param_names,param_types,description
2-
aggregate,uniq,UInt64,,Any,"Approximate number of different values using HyperLogLog."
3-
scalar,abs,Numeric,,Numeric,"Returns absolute value."
4-
scalar,round,Float,,Float, "Rounds number to specified decimal places."
5-
scalar,floor,Float,,Float,"Rounds down to nearest integer."
6-
scalar,ceil,Float,,Float,"Rounds up to nearest integer."
7-
scalar,exp,Float,,Float,"Returns e raised to the power of x."
8-
scalar,log,Float,,Float,"Returns natural logarithm."
9-
scalar,log2,Float,,Float,"Returns base-2 logarithm."
10-
scalar,log10,Float,,Float,"Returns base-10 logarithm."
11-
scalar,sqrt,Float,,Float,"Returns square root."
2+
aggregate,uniq,UInt64,,,"Approximate number of different values using HyperLogLog."
123
scalar,rand,UInt32,,,"Returns random number."
134
scalar,rand64,UInt64,,,"Returns random 64-bit number."
14-
scalar,pi,Float,,,"Returns value of π."
155
scalar,e,Float,,,"Returns value of e."
16-
scalar,concat,String,,Array<String>, "Concatenates strings."
17-
scalar,length,UInt64,,String,"Returns string length in bytes."
18-
scalar,lower,String,,String,"Converts string to lowercase."
19-
scalar,upper,String,,String,"Converts string to uppercase."
20-
scalar,ltrim,String,,String,"Removes leading whitespace."
21-
scalar,rtrim,String,,String,"Removes trailing whitespace."
22-
scalar,reverse,String,,String,"Reverses string."
23-
scalar,empty,UInt8,,Array, "Checks if array is empty."
24-
scalar,now,DateTime,,,"Returns current date and time."
25-
scalar,today,Date,,,"Returns current date."
266
scalar,yesterday,Date,,,"Returns yesterday's date."
+6-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
function_type,name,return_type,param_names,param_types,description
2-
scalar,ceil,Numeric,,decimal,"Returns smallest integer greater than number."
3-
scalar,floor,Numeric,,decimal,"Returns largest integer less than number."
4-
scalar,pi,Float,,, "Returns value of PI."
5-
scalar,getdate,Datetime,,, "Returns current date and time."
6-
scalar,getutcdate,Datetime,,, "Returns current UTC date and time."
7-
scalar,sysdatetime,Datetime,,, "Returns date and time of SQL Server."
8-
scalar,host_name,String,,, "Returns workstation name."
9-
scalar,newid,String,,, "Returns new GUID."
10-
scalar,user_name,String,,, "Returns database user name."
11-
scalar,upper,String,,varchar,"Converts string to uppercase."
12-
scalar,lower,String,,varchar,"Converts string to lowercase."
2+
scalar,getdate,Datetime,,,"Returns current date and time."
3+
scalar,getutcdate,Datetime,,,"Returns current UTC date and time."
4+
scalar,sysdatetime,Datetime,,,"Returns date and time of SQL Server."
5+
scalar,host_name,String,,,"Returns workstation name."
6+
scalar,newid,String,,,"Returns new GUID."
7+
scalar,user_name,String,,,"Returns database user name."

0 commit comments

Comments
 (0)