static boolean updateCardinality(PlanNode node, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { Float cost = (Float) node.getProperty(NodeConstants.Info.EST_CARDINALITY); // check if already computed boolean updated = false; for (PlanNode child : node.getChildren()) { updated |= updateCardinality(child, metadata); } if(cost == null || updated) { computeNodeCost(node, metadata); return true; } return false; }
static boolean updateCardinality(PlanNode node, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { Float cost = (Float) node.getProperty(NodeConstants.Info.EST_CARDINALITY); // check if already computed boolean updated = false; for (PlanNode child : node.getChildren()) { updated |= updateCardinality(child, metadata); } if(cost == null || updated) { computeNodeCost(node, metadata); return true; } return false; }
static boolean updateCardinality(PlanNode node, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { Float cost = (Float) node.getProperty(NodeConstants.Info.EST_CARDINALITY); // check if already computed boolean updated = false; for (PlanNode child : node.getChildren()) { updated |= updateCardinality(child, metadata); } if(cost == null || updated) { computeNodeCost(node, metadata); return true; } return false; }