public class NewCalculateCostUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NewCalculateCostUtil.DependentCostAnalysis |
Modifier and Type | Field and Description |
---|---|
static int |
UNKNOWN_JOIN_SCALING |
static float |
UNKNOWN_VALUE |
Constructor and Description |
---|
NewCalculateCostUtil() |
Modifier and Type | Method and Description |
---|---|
static NewCalculateCostUtil.DependentCostAnalysis |
computeCostForDepJoin(PlanNode joinNode,
boolean leftIndependent,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
CommandContext context)
Computes the cost of a Dependent Join
The worst possible cost will arise from a high independent ndv (many dependent sets) and a low dependent ndv (possibly many matches per set)
This logic uses the same assumption as criteria in that ndv is used as a divisor of cardinality.
|
static NewCalculateCostUtil.DependentCostAnalysis |
computeCostForDepJoin(PlanNode independentNode,
PlanNode dependentNode,
List independentExpressions,
List dependentExpressions,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
CommandContext context) |
static Object |
getKeyUsed(Collection<? extends Expression> allElements,
Set<GroupSymbol> groups,
QueryMetadataInterface metadata,
Boolean unique) |
static boolean |
usesKey(Collection<? extends Expression> allElements,
QueryMetadataInterface metadata)
TODO: this uses key check is not really accurate, it doesn't take into consideration where
we are in the plan.
|
static boolean |
usesKey(Collection<? extends Expression> allElements,
Set<GroupSymbol> groups,
QueryMetadataInterface metadata,
boolean unique) |
static boolean |
usesKey(Criteria crit,
QueryMetadataInterface metadata) |
public static final int UNKNOWN_JOIN_SCALING
public static final float UNKNOWN_VALUE
public static boolean usesKey(Criteria crit, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException
public static boolean usesKey(Collection<? extends Expression> allElements, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException
public static boolean usesKey(Collection<? extends Expression> allElements, Set<GroupSymbol> groups, QueryMetadataInterface metadata, boolean unique) throws QueryMetadataException, TeiidComponentException
public static Object getKeyUsed(Collection<? extends Expression> allElements, Set<GroupSymbol> groups, QueryMetadataInterface metadata, Boolean unique) throws QueryMetadataException, TeiidComponentException
public static NewCalculateCostUtil.DependentCostAnalysis computeCostForDepJoin(PlanNode joinNode, boolean leftIndependent, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, CommandContext context) throws TeiidComponentException, QueryMetadataException, QueryPlannerException
public static NewCalculateCostUtil.DependentCostAnalysis computeCostForDepJoin(PlanNode independentNode, PlanNode dependentNode, List independentExpressions, List dependentExpressions, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, CommandContext context) throws QueryMetadataException, TeiidComponentException, QueryPlannerException
Copyright © 2020. All rights reserved.