int rowWidth = child.getRowType().getFieldCount() * DrillCostBase.AVG_FIELD_WIDTH;
double hashCpuCost = DrillCostBase.HASH_CPU_COST * inputRows * distFields.size();
double svrCpuCost = DrillCostBase.SVR_CPU_COST * inputRows;
double mergeCpuCost = DrillCostBase.COMPARE_CPU_COST * inputRows * (Math.log(numEndPoints)/Math.log(2));
double networkCost = DrillCostBase.BYTE_NETWORK_COST * inputRows * rowWidth;
DrillCostFactory costFactory = (DrillCostFactory)planner.getCostFactory();
return costFactory.makeCost(inputRows, hashCpuCost + svrCpuCost + mergeCpuCost, 0, networkCost);
}