Skip to content
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

Add functions for Trino #953

Open
grieve54706 opened this issue Nov 26, 2024 · 0 comments
Open

Add functions for Trino #953

grieve54706 opened this issue Nov 26, 2024 · 0 comments

Comments

@grieve54706
Copy link
Contributor

grieve54706 commented Nov 26, 2024

We added a test case for all functions. But don't have time to fix all. So we move out some functions that need to be revised and submit this issue to add them back.

function_type,name,return_type,param_names,param_types,description
aggregate,approx_percentile,same as input,,array<any>,Approximates percentile
aggregate,approximate_distinct,bigint,,any,Approximates count of distinct values
aggregate,corr,double,,double,double,Returns correlation coefficient
aggregate,covar_samp,double,,double,double,Returns sample covariance
aggregate,map_agg,map,,any,any,Aggregates key/value pairs into map
aggregate,regr_intercept,double,,double,double,Returns linear regression intercept
aggregate,regr_slope,double,,double,double,Returns linear regression slope
aggregate,string_agg,varchar,,varchar,varchar,Concatenates strings with delimiter
scalar,current_date,date,,none,Returns current date
scalar,date_add,date,,varchar,interval,Adds interval to date
scalar,date_sub,date,,varchar,interval,Subtracts interval from date
scalar,date_trunc,timestamp,,varchar,timestamp,Truncates timestamp to specified precision
scalar,element_at,any,,array,integer,Returns element at specified position in array
scalar,filter,array,,array,function,Filters array using lambda
scalar,format_datetime,varchar,,timestamp,varchar,Formats datetime according to format string
scalar,from_hex,varbinary,,varchar,Converts hex string to binary
scalar,hamming_distance,bigint,,varchar,varchar,Calculates Hamming distance
scalar,json_extract,json,,json,varchar,Extracts JSON by JSONPath
scalar,json_format,varchar,,json,Pretty prints JSON
scalar,json_parse,json,,varchar,Parses string as JSON
scalar,levenshtein_distance,bigint,,varchar,varchar,Calculates Levenshtein distance
scalar,length,bigint,,varchar,Returns length of string
scalar,map_concat,map,,map,map,Concatenates two maps
scalar,md5,varchar,,varchar,Computes MD5 hash
scalar,parse_datetime,timestamp,,varchar,varchar,Parses string to datetime using format
scalar,reduce,any,,array,function,function,any,Reduces array to single value using lambda
scalar,regexp_extract,varchar,,varchar,varchar,Extracts substring using regex
scalar,regexp_like,boolean,,varchar,varchar,Tests if string matches regex
scalar,regexp_replace,varchar,,varchar,varchar,varchar,Replaces substring using regex
scalar,replace,varchar,,varchar,varchar,varchar,Replaces substring in string
scalar,sha256,varchar,,varchar,Computes SHA256 hash
scalar,split,array,,varchar,varchar,Splits string by delimiter into array
scalar,split_part,varchar,,varchar,varchar,integer,Returns specific part from split string
scalar,strpos,bigint,,varchar,varchar,Returns position of substring
scalar,substr,varchar,,varchar,integer,integer,Extracts substring from string
scalar,to_hex,varchar,,bigint,Converts number to hex string
scalar,transform,array,,array,function,Applies lambda to each element
scalar,trim,varchar,,varchar,Removes leading and trailing whitespace
scalar,uuid,varchar,,none,Generates random UUID
scalar,xxhash64,bigint,,varchar,Computes xxHash64 hash
scalar,zip_with,array,,array,array,function,Combines two arrays using lambda
window,cume_dist,double,,none,Returns cumulative distribution
window,dense_rank,bigint,,none,Returns rank without gaps
window,first_value,any,,any,integer,Returns first value in window
window,lag,any,,any,integer,Returns value from previous row
window,last_value,any,,any,integer,Returns last value in window
window,lead,any,,any,integer,Returns value from following row
window,nth_value,any,,any,integer,Returns nth value in window
window,ntile,bigint,,integer,Divides rows into buckets
window,percent_rank,double,,none,Returns percent rank of row
window,rank,bigint,,none,Returns rank with gaps
window,row_number,bigint,,none,Returns sequential row number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant