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 Clickhouse #951

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

Add functions for Clickhouse #951

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,count,UInt64,,, "Counts the number of rows or non-NULL values."
aggregate,countIf,UInt64,,Boolean,"Counts the number of rows that match a condition."
aggregate,uniqExact,UInt64,,Any,"Exact number of different values."
aggregate,groupArray,Array,,Any,"Creates an array of values."
aggregate,quantile,Float64,,Float64, "Calculates quantile using reservoir sampling."
aggregate,quantileDeterministic,Float64,,Float64, "Deterministic calculation of quantile."
aggregate,quantileExact,Float64,,Float64,"Exact calculation of quantile."
aggregate,quantileExactWeighted,Float64,,Float64, "Exact calculation of weighted quantile."
aggregate,varPop,Float64,,Numeric,"Calculate population variance."
aggregate,varSamp,Float64,,Numeric,"Calculate sample variance."
aggregate,stddevPop,Float64,,Numeric,"Calculate population standard deviation."
aggregate,stddevSamp,Float64,,Numeric,"Calculate sample standard deviation."
aggregate,covarPop,Float64,,Numeric, "Calculate population covariance."
aggregate,covarSamp,Float64,,Numeric,"Calculate sample covariance."
aggregate,corrStable,Float64,,Numeric, "Calculate correlation coefficient."
aggregate,arrayUniq,UInt64,,Array,"Returns number of unique elements across arrays."
aggregate,sumArray,Array,,Array,"Sum of arrays element-wise."
aggregate,groupArrayArray,Array,,Array,"Combines multiple arrays into array of arrays."
scalar,toInt8,Int8,,Any,"Converts input to Int8 data type."
scalar,toInt16,Int16,,Any,"Converts input to Int16 data type."
scalar,toInt32,Int32,,Any,"Converts input to Int32 data type."
scalar,toInt64,Int64,,Any,"Converts input to Int64 data type."
scalar,toUInt8,UInt8,,Any,"Converts input to UInt8 data type."
scalar,toUInt16,UInt16,,Any,"Converts input to UInt16 data type."
scalar,toUInt32,UInt32,,Any,"Converts input to UInt32 data type."
scalar,toUInt64,UInt64,,Any,"Converts input to UInt64 data type."
scalar,toFloat32,Float32,,Any,"Converts input to Float32 data type."
scalar,toFloat64,Float64,,Any,"Converts input to Float64 data type."
scalar,toDate,Date,,Any,"Converts input to Date type."
scalar,toDateTime,DateTime,,Any,"Converts input to DateTime type."
scalar,toString,String,,Any,"Converts input to String type."
scalar,toDecimal32,Decimal32,,Any,"Converts input to Decimal32 type."
scalar,toDecimal64,Decimal64,,Any,"Converts input to Decimal64 type."
scalar,toDecimal128,Decimal128,,Any,"Converts input to Decimal128 type."
scalar,power,Float64,,Float64, "Raises a number to the specified power."
scalar,cbrt,Float64,,Float64,"Returns cube root."
scalar,match,UInt8,,String, "Returns whether string matches regex pattern."
scalar,like,UInt8,,String, "Pattern matching using LIKE operator."
scalar,notLike,UInt8,,String, "Inverse of LIKE operator."
scalar,substring,String,,String, "Extracts substring."
scalar,substringUTF8,String,,String, "Extracts substring considering UTF-8 encoding."
scalar,lengthUTF8,UInt64,,String,"Returns string length in Unicode characters."
scalar,trim,String,,String,"Removes leading and trailing whitespace."
scalar,replaceAll,String,,String,"Replaces all occurrences of substring."
scalar,replaceRegexpAll,String,,String,"Replaces all regex matches."
scalar,notEmpty,UInt8,,Array,"Checks if array is not empty."
scalar,arrayLength,UInt64,,Array,"Returns length of array."
scalar,arrayConcat,Array,,Array,"Concatenates arrays."
scalar,arrayElement,Any,,Array, "Returns array element at specified index."
scalar,has,UInt8,,Array,"Checks if array contains value."
scalar,indexOf,UInt64,,Array,"Returns index of first occurrence of element."
scalar,toYear,UInt16,,DateTime, "Extracts year from date/datetime."
scalar,toQuarter,UInt8,,DateTime, "Extracts quarter from date/datetime."
scalar,toMonth,UInt8,,DateTime,"Extracts month from date/datetime."
scalar,toDayOfMonth,UInt8,,DateTime,"Extracts day of month from date/datetime."
scalar,toDayOfWeek,UInt8,,DateTime,"Extracts day of week from date/datetime."
scalar,toHour,UInt8,,DateTime,"Extracts hour from datetime."
scalar,toMinute,UInt8,,DateTime,"Extracts minute from datetime."
scalar,toSecond,UInt8,,DateTime,"Extracts second from datetime."
scalar,formatDateTime,String,,DateTime,"Formats date/time according to given format."
scalar,JSONHas,UInt8,,String,"Checks if JSON field exists."
scalar,JSONLength,UInt64,,String,"Returns length of JSON array or object."
scalar,JSONType,String,,String,"Returns type of JSON value."
scalar,JSONExtractString,String,,String,"Extracts string from JSON."
scalar,JSONExtractFloat,Float64,,String,"Extracts float from JSON."
scalar,JSONExtractInt,Int64,,String,"Extracts integer from JSON."
scalar,IPv4NumToString,String,,UInt32,"Converts IPv4 to string."
scalar,IPv4StringToNum,UInt32,,String,"Converts string to IPv4."
scalar,IPv6NumToString,String,,FixedString(16),"Converts IPv6 to string."
scalar,IPv6StringToNum,FixedString(16),,String,"Converts string to IPv6."
window,rowNumberInAllBlocks,UInt64,,,"Returns row number across all blocks."
window,rowNumberInBlock,UInt64,,,"Returns row number within current block."
window,rank,UInt64,,,"Returns rank of current row with gaps."
window,denseRank,UInt64,,,"Returns rank of current row without gaps."
window,runningDifference,Same as input,,Numeric,"Returns difference between successive values."
window,lagInFrame,Same as input,,Numeric,"Returns value from previous row in frame."
window,leadInFrame,Same as input,,Numeric,"Returns value from next row in frame."
window,firstValue,Same as input,,Any,"Returns first value in window frame."
window,lastValue,Same as input,,Any,"Returns last value in window frame."
window,nthValue,Same as input,,Any,"Returns nth value in window frame."
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