break;
case NodeConstants.Types.ACCESS:
case NodeConstants.Types.SORT:
{
//Simply record the cost of the only child
PlanNode child = node.getFirstChild();
Float childCost = (Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY);
setCardinalityEstimate(node, childCost, true, metadata);
break;
}
case NodeConstants.Types.NULL:
setCardinalityEstimate(node, 0f, true, metadata);
break;
case NodeConstants.Types.PROJECT:
{
Float childCost = null;
//Simply record the cost of the only child
if (node.getChildCount() != 0) {
PlanNode child = node.getFirstChild();
childCost = (Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY);
} else {
childCost = 1f;
}
setCardinalityEstimate(node, childCost, true, metadata);
break;
}
case NodeConstants.Types.SET_OP:
{
estimateSetOpCost(node, metadata);
break;
}
case NodeConstants.Types.TUPLE_LIMIT:
{
PlanNode child = node.getFirstChild();
float childCost = child.getCardinality();
Expression offset = (Expression)node.getProperty(NodeConstants.Info.OFFSET_TUPLE_COUNT);
Float cost = childCost;
if (childCost != UNKNOWN_VALUE && offset instanceof Constant) {