How to declare the signature of an aggregate function with variadic arguments #11672
Unanswered
shenh062326
asked this question in
Q&A
Replies: 1 comment
-
Hi, @mbasmanova @Yuhta . Do you have any suggestions for this question? Can we define a variadic arguments aggregate function in velox? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently we can add a scalar function with variadic arguments, https://facebookincubator.github.io/velox/develop/scalar-functions.html#variadic-arguments .
In some scenarios, we also need to support variadic arguments in aggregate functions. For example, we need a count(col1, col2, col3 ...) function to count the number of rows where each column is not null. Other similar variadic arguments aggregate functions include sequence_count, sequence_match, etc. But I'm not sure how to add variadic arguments aggregate functions, it will throw "Type doesn't exist: 'VARIADIC ANY'" in the following code.
Can anyone tell me how to define a variadic arguments aggregate function or is it not supported by velox?
Beta Was this translation helpful? Give feedback.
All reactions