public CostEstimate estimateCost(ExpressionsHKeyScan scan) {
PlanCostEstimator estimator = newEstimator();
Set<TableSource> requiredTables = scan.getRequiredTables();
estimator.hKeyRow(scan);
estimator.flatten(tables, scan.getTable(), requiredTables);
Collection<ConditionExpression> unhandledConditions =
new HashSet<>(requiredConditions);
unhandledConditions.removeAll(scan.getConditions());