Generalize cardinality estimator