Algorithm of the approxdc function

Hi, I have a question about the approxdc function.

I found the source code of the approxdc function in /src/query/BuiltinAggregates.cpp.
So I try to understand how does the approxdc function computes the approximate result, but I failed.

Is there any papers or explanation about the algorithm? Please help me.
Thanks.

I suspect the algorithm is along the lines of https://en.wikipedia.org/wiki/Flajolet–Martin_algorithm or one of the follow-on algorithms you will find there, as is typical for such cardinality estimating functions. The email address of the author is in the code.

1 Like

Thank you so much!
I’ll check it right away.

Have a nice day!