public class CompilerHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CompilerHelper.JoinHelper
Calculated index mappings for a join, based on the common variables of the two parent subplans.
|
Constructor and Description |
---|
CompilerHelper() |
Modifier and Type | Method and Description |
---|---|
static PlanningTrace |
checkAndTrimEqualVariables(SubPlan plan,
PlanningTrace coreTrace)
Makes sure that all variables in the tuple are different so that it can be used as
CompiledSubPlan . |
static java.util.List<PVariable> |
convertVariablesTuple(EnumerablePConstraint constraint)
Extracts the variable list representation of the variables tuple.
|
static java.util.List<PVariable> |
convertVariablesTuple(Tuple variablesTuple)
Extracts the variable list representation of the variables tuple.
|
static RecipeTraceInfo |
makeIndexerTrace(SubPlan planToCompile,
PlanningTrace parentTrace,
TupleMask mask)
Returns a compiled indexer trace according to a mask
|
static Mask |
makeProjectionMask(PlanningTrace compiledParent,
java.lang.Iterable<PVariable> projectedVariables) |
static CompiledQuery |
makeQueryTrace(PQuery query,
java.util.Collection<RecipeTraceInfo> bodyFinalTraces,
java.util.Collection<ReteNodeRecipe> bodyFinalRecipes)
Creates a recipe for a production node and the corresponding trace.
|
public static PlanningTrace checkAndTrimEqualVariables(SubPlan plan, PlanningTrace coreTrace)
CompiledSubPlan
.
If a variable occurs multiple times, equality checks are applied and then the results are trimmed so that duplicates are hidden.
If no manipulation is necessary, the original trace is returned.
to be used whenever a constraint introduces new variables.
public static java.util.List<PVariable> convertVariablesTuple(EnumerablePConstraint constraint)
public static java.util.List<PVariable> convertVariablesTuple(Tuple variablesTuple)
public static RecipeTraceInfo makeIndexerTrace(SubPlan planToCompile, PlanningTrace parentTrace, TupleMask mask)
public static Mask makeProjectionMask(PlanningTrace compiledParent, java.lang.Iterable<PVariable> projectedVariables)
public static CompiledQuery makeQueryTrace(PQuery query, java.util.Collection<RecipeTraceInfo> bodyFinalTraces, java.util.Collection<ReteNodeRecipe> bodyFinalRecipes)