This message was deleted.
# troubleshooting
s
This message was deleted.
g
essentially -- APPROX_COUNT_DISTINCT_DS_THETA (and its cousin DS_HLL) is an aggregation function, whereas THETA_SKETCH_ESTIMATE is a regular function
in the example you gave, i think you want an aggregation, so APPROX_COUNT_DISTINCT_DS_THETA is the valid choice
THETA_SKETCH_ESTIMATE is meant for use after doing intersections and stuff
for example: https://druid.apache.org/docs/latest/tutorials/tutorial-sketches-theta.html#set-operations
Copy code
SELECT THETA_SKETCH_ESTIMATE(
         THETA_SKETCH_INTERSECT(
           DS_THETA(theta_uid) FILTER(WHERE "show" = 'Bridgerton' AND "episode" = 'S1E1'),
           DS_THETA(theta_uid) FILTER(WHERE "show" = 'Bridgerton' AND "episode" = 'S1E2')
         )
       ) AS users
FROM ts_tutorial
👍 1