Estimation interfaces
bondi.estimation.CardinalityEstimate
dataclass
Estimated filter cardinality relative to a recorded population.
Sampling implementations report observed matches and actual sample size. Other implementations may leave these diagnostics absent. A zero sample match count is not proof that the full population has no matches.
Source code in src/bondi/estimation.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
selectivity
property
Estimated matching fraction; zero for an empty population.
bondi.estimation.CardinalityEstimator
Bases: Protocol[QueryT]
Synchronous estimation; concrete implementations define supported queries.
Source code in src/bondi/estimation.py
29 30 31 32 33 34 | |
estimate(query)
Estimate cardinality in the implementation's configured population.
Source code in src/bondi/estimation.py
32 33 34 | |
bondi.estimation.AsyncCardinalityEstimator
Bases: Protocol[QueryT]
Async estimation for implementations requiring asynchronous I/O.
Source code in src/bondi/estimation.py
37 38 39 40 41 42 | |
estimate(query)
async
Estimate cardinality in the implementation's configured population.
Source code in src/bondi/estimation.py
40 41 42 | |