Diogo Baeder
06/25/2022, 1:48 AM1
if it matches a certain number X, and to 0
if it doesn't. More on this thread.Diogo Baeder
06/25/2022, 1:50 AMDiogo Baeder
06/25/2022, 1:52 AMselect match_equals(12, 1, 0), match_equals(23, 1, 0), match_equals(34, 1, 0)
and then get (1, 0, 0)
if the number matches 12, (0, 1, 0)
if it matches 23 and (0, 0, 1)
if it matches 34. Is there something I can use to get a result like this?Diogo Baeder
06/25/2022, 1:54 AM12
, 1 of them matches 23
and none of them matches 34
, I need to sum them up and have a result like (2, 1, 0)
Diogo Baeder
06/25/2022, 2:23 AMarrayIndexOfInt
which I can use to hack my way through, just don't know if this will perform well though...Xiaobing
06/25/2022, 2:50 AMcase-when
can help here: https://docs.pinot.apache.org/users/user-guide-query/querying-pinot#case-when-statementDiogo Baeder
06/25/2022, 2:52 AMDiogo Baeder
06/25/2022, 2:56 AMSELECT (CASE WHEN 9 = 9 THEN 1 ELSE 0 END) AS is_unknown FROM ignoreMe
or is it just because I'm not using it with real data?Xiaobing
06/25/2022, 2:59 AMDiogo Baeder
06/25/2022, 3:00 AMDiogo Baeder
06/25/2022, 5:09 PM