This message was deleted.
# general
s
This message was deleted.
j
It is an approximate count. For 2^16, 2 standard deviations is roughly +-0.78%. Are you consistently seeing larger deviations than that?
a
Yes. I am seeing close to 5% while doing a UNION. With more set operations, the error is increasing.
l
What kind of set operations? Are you doing any intersection or set difference operations?
We would like to help you troubleshoot this error issue, but without more information from you there is not much we can do.
w
we encountered this problem it is computing a sketch of the sketch with druid sql
it should be a known bug, but idk if it’s matriculated up
you can get around it with a special function on ingest. Tag the column as a string in the ingest spec and then use COMPLEX_DECODE_BASE64(‘thetaSketch’,active_users_1d_new_theta)
a
shouldn’t the results look completely arbitrary in such a case, not just a few percent off?
j
If the input is all mostly single-item sketches I could see something weird like that being possible
a
yes, and most likely in that case we should see an underestimate since sketches representing several distinct values will be counted as one distinct value
1
w
yeah it should always be an order of magnitude underestimate and was when I tested it
l
So if you know it is going to be a gross underestimate, I don’t understand your issue that you observe 5% error. Sketching sketches as input is NOT a Union operation.
j
I believe @William Kennedy was explaining a solution to a possible issue with the original question?
a
the topic starter might have a completely different issue
w
yes I’m not too sure on the APPROX_COUNT_DISTINCT_DS_THETA behavior with input theta sketches in SQL, but definitely DS_THETA with input theta sketches in SQL just sketches the sketches and doesn’t work at all unless you include the undocumented COMPLEX_DECODE_BASE64 function information. As they mention getting the sketch into druid with DS_THETA is a probable workaround that they could test except it doesn’t work by default.
l
What I am hearing is that there is no evidence, so far, that there is an accuracy issue with the DS_THETA sketch itself, but likely an issue with how it is being configured and used in the system. Is this a fair summary?
a
we need more info from the topic starter
1