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 MSSQL #949

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

Add functions for MSSQL #949

grieve54706 opened this issue Nov 26, 2024 · 0 comments

Comments

@grieve54706
Copy link
Contributor

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,avg,Numeric,,any,"Returns the average of values in a group."
aggregate,count,Bigint,,any,"Returns the number of items in a group."
aggregate,count_big,Bigint,,, "Returns the number of items in a group as bigint."
aggregate,grouping,Int,,, "Returns a bit indicating if row is aggregated or not."
aggregate,grouping_id,Int,,, "Returns level of grouping."
aggregate,max,Same as input,,any,"Returns the maximum value in a group."
aggregate,min,Same as input,,any,"Returns the minimum value in a group."
aggregate,sum,Numeric,,any,"Returns the sum of all values in a group."
aggregate,stdev,Float,,, "Returns the statistical standard deviation of values."
aggregate,stdevp,Float,,, "Returns the population standard deviation."
aggregate,var,Float,,, "Returns the statistical variance of values."
aggregate,varp,Float,,, "Returns the population statistical variance."
aggregate,string_agg,String,,, "Concatenates strings with separator."
aggregate,checksum_agg,Int,,, "Returns checksum of values."
scalar,acos,Float,,, "Returns arc cosine value."
scalar,asin,Float,,, "Returns arc sine value."
scalar,atan,Float,,, "Returns arc tangent value."
scalar,atn2,Float,,, "Returns angle in radians between x-axis and line."
scalar,cos,Float,,, "Returns cosine value."
scalar,cot,Float,,, "Returns cotangent value."
scalar,degrees,Float,,, "Converts radians to degrees."
scalar,exp,Float,,, "Returns exponential value."
scalar,log,Float,,, "Returns natural logarithm."
scalar,log10,Float,,, "Returns base-10 logarithm."
scalar,power,Float,,decimal,"Returns value raised to specified power."
scalar,radians,Float,,, "Converts degrees to radians."
scalar,round,Numeric,,decimal,int,"Rounds numeric value."
scalar,sign,Int,,, "Returns sign of number (+1, -1, 0)."
scalar,sin,Float,,, "Returns sine value."
scalar,sqrt,Float,,, "Returns square root."
scalar,square,Float,,, "Returns square of number."
scalar,tan,Float,,, "Returns tangent value."
scalar,ascii,Int,,, "Returns ASCII code of leftmost character."
scalar,char,Char,,, "Returns character with specified ASCII code."
scalar,charindex,Int,,, "Returns starting position of string."
scalar,concat_ws,String,,, "Concatenates strings with separator."
scalar,datalength,Int,,, "Returns number of bytes used."
scalar,difference,Int,,, "Returns difference between SOUNDEX values."
scalar,format,String,,decimal,int,"Returns formatted value."
scalar,left,String,,varchar,int,"Returns leftmost characters."
scalar,len,Int,,, "Returns number of characters."
scalar,ltrim,String,,, "Removes leading spaces."
scalar,nchar,String,,, "Returns Unicode character."
scalar,patindex,Int,,, "Returns starting position of pattern."
scalar,quotename,String,,, "Returns delimited identifier."
scalar,replace,String,,varchar,varchar,varchar,"Replaces string values."
scalar,replicate,String,,, "Repeats string value."
scalar,reverse,String,,, "Returns reverse of string."
scalar,right,String,,varchar,int,"Returns rightmost characters."
scalar,rtrim,String,,, "Removes trailing spaces."
scalar,soundex,String,,, "Returns SOUNDEX code."
scalar,space,String,,, "Returns string of spaces."
scalar,str,String,,, "Returns string from numeric."
scalar,stuff,String,,, "Deletes and inserts string."
scalar,substring,String,,, "Returns part of string."
scalar,trim,String,,varchar,"Removes leading and trailing spaces."
scalar,unicode,Int,,, "Returns Unicode value."
scalar,cast,Any,,any,varchar,"Converts value to specified type."
scalar,convert,Any,,, "Converts value to specified type."
scalar,coalesce,Same as input,,any,"Returns first non-null value."
scalar,nullif,Same as input,,, "Returns NULL if values equal."
scalar,isnull,Same as input,,, "Replaces NULL with specified value."
scalar,iif,Same as input,,, "Returns value based on Boolean expression."
scalar,choose,Same as input,,, "Returns item at specified index."
scalar,dateadd,Datetime,,datetime,interval,"Adds interval to date."
scalar,datediff,Int,,date,date,"Returns difference between dates."
scalar,datefromparts,Date,,, "Returns date from parts."
scalar,datename,String,,, "Returns date part as string."
scalar,datepart,Int,,, "Returns date part as integer."
scalar,day,Int,,, "Returns day of month."
scalar,isdate,Int,,, "Checks if value is valid date."
scalar,month,Int,,, "Returns month part."
scalar,year,Int,,, "Returns year part."
scalar,current_user,String,,, "Returns current user name."
scalar,isnumeric,Int,,, "Checks if value is numeric."
scalar,serverproperty,Any,,, "Returns server property info."
scalar,session_user,String,,, "Returns session user name."
scalar,system_user,String,,, "Returns login name."
window,row_number,Bigint,,, "Returns sequential row number."
window,rank,Bigint,,, "Returns rank with gaps."
window,dense_rank,Bigint,,, "Returns rank without gaps."
window,ntile,Bigint,,, "Distributes rows into groups."
window,lag,Same as input,,any,int,"Returns previous row value."
window,lead,Same as input,,any,int,"Returns next row value."
window,first_value,Same as input,,any,"Returns first value in window."
window,last_value,Same as input,,any,"Returns last value in window."
window,cume_dist,Float,,, "Returns cumulative distribution."
window,percent_rank,Float,,, "Returns relative rank of row."
window,percentile_cont,Float,,, "Returns percentile based on continuous distribution."
window,percentile_disc,Same as input,,, "Returns percentile based on discrete distribution."
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