Join Slack
Powered by
Is there a way we can do mode calculation in Pinot...
# troubleshooting
y
Yash Agarwal
01/08/2021, 5:04 AM
Is there a way we can do mode calculation in Pinot ?
k
Kishore G
01/08/2021, 5:12 AM
whats the use case? what do you want the result to be if there are multiple modes
y
Yash Agarwal
01/08/2021, 5:12 AM
For our business purpose, we want the smallest value.
k
Kishore G
01/08/2021, 5:13 AM
dont think we have a udf for that right now
Kishore G
01/08/2021, 5:13 AM
two work arounds
Kishore G
01/08/2021, 5:14 AM
• select count(*) as count, x from T order by count asc top 10
y
Yash Agarwal
01/08/2021, 7:01 AM
It would be hard for us to split the query into multiple queries, would it be possible to create a udf for the same ?
k
Kishore G
01/08/2021, 7:06 AM
yes,
Open in Slack
Previous
Next