Skip to content

fix(ibis): refactor the available function list #1112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


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