Evan Galpin
12/21/2021, 10:15 PMCOUNTMATCHMV(my_column, "foo")
where a string MV column containing:
["foo", "bar", "foo", "baz"]
might return 2.
Thoughts on the feasibility?
[1] https://github.com/apache/pinot/blob/f8c7e1fc8603f4091e418f3841dcb6bc2d75d5d8/pino[…]core/query/aggregation/function/CountMVAggregationFunction.javaMayank
ValueIn
transform function: https://docs.pinot.apache.org/users/user-guide-query/supported-transformationsMayank
Jackie
12/21/2021, 11:08 PMHAVING
to filter the aggregations (or post-aggregation transform results)Evan Galpin
12/22/2021, 3:24 PMValueIn
and CountMV
. Using the airline stats quick start example I could run:
select
AirlineID,
countmv(valuein(DivAirports, 'ORD')) as ORD
from
airlineStats
GROUP BY AirlineID
limit 10
to count instances of ORD
in DivAirports, per Airline. I could also add HAVING ORD > 0
as per Jackie’s suggestion.
Thanks for the help folks!Mayank