public CostEstimate estimateCost(GroupLoopScan scan) {
PlanCostEstimator estimator = newEstimator();
Set<TableSource> requiredTables = scan.getRequiredTables();
estimator.groupLoop(scan, tables, requiredTables);
Collection<ConditionExpression> unhandledConditions =
new HashSet<>(requiredConditions);
addInnerJoinConditions(unhandledConditions, scan.getInsideTable());
unhandledConditions.removeAll(scan.getJoinConditions());