CostEstimate leftCostEstimate = leftResultSet.getCostEstimate();
CostEstimate rightCostEstimate = rightResultSet.getCostEstimate();
// The cost is the sum of the two child costs plus the cost of sorting the union.
costEstimate.setCost( leftCostEstimate.getEstimatedCost() + rightCostEstimate.getEstimatedCost(),
getRowCountEstimate( leftCostEstimate.rowCount(),
rightCostEstimate.rowCount()),
getSingleScanRowCountEstimate( leftCostEstimate.singleScanRowCount(),
rightCostEstimate.singleScanRowCount()));
return costEstimate;
} // End of estimateCost