confluentinc/ksql

Array size function / Rank

Open

#2.579 aberto em 19 de mar. de 2019

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)Java (1.048 forks)batch import
help wanteduser-defined-functions

Métricas do repositório

Stars
 (5.739 stars)
Métricas de merge de PR
 (Mesclagem média 4d 20h) (6 fundiu PRs em 30d)

Description

Hi, I've noticed that there is no RANK() or DENSE_RANK() function in KSQL. I tried to work around this by calling TOPKDISTINCT(col, static_int) and then returning the size of the array given by TOPKDISTINCT(), all within my relevant group by. Is there any workaround for this? I am not well versed in Java/Scala, so I could try writing this as a UDF, but I would prefer is there was a native solution for this. Cheers!

Guia do colaborador