confluentinc/ksql

Array size function / Rank

オープン

#2,579 opened on 2019/03/19

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Java (1,048 件のフォーク)batch import
help wanteduser-defined-functions

Repository metrics

Stars
 (5,739 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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!

コントリビューターガイド