confluentinc/ksql

Array size function / Rank

开放

#2,579 创建于 2019年3月19日

 (3 条评论) (0 个反应) (0 位负责人)Java (1,048 个派生)batch import
help wanteduser-defined-functions

仓库指标

星标
 (5,739 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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!

贡献者指南