I am exploring a way to achive this like the SQL below in flink.
SELECT a_tag,NEST(type) AS type_arr FROM a GROUP BY a_tag
NEST()
is a user defined function
whitch aggregate int
to array<int>
.
But i can't change the output type because the UDF class extends AggregateFunction
Is there any suggestion?Thanks a lot.
question from:https://stackoverflow.com/questions/65644052/how-can-i-aggregate-int-column-to-arrayint-in-flink