Search in sources :

Example 16 with IAlgebraicRewriteRule

use of org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule in project asterixdb by apache.

the class PigletRewriteRuleset method buildPhysicalRewritesTopLevelRuleCollection.

public static final List<IAlgebraicRewriteRule> buildPhysicalRewritesTopLevelRuleCollection() {
    List<IAlgebraicRewriteRule> physicalPlanRewrites = new LinkedList<IAlgebraicRewriteRule>();
    physicalPlanRewrites.add(new CopyLimitDownRule());
    return physicalPlanRewrites;
}
Also used : CopyLimitDownRule(org.apache.hyracks.algebricks.rewriter.rules.CopyLimitDownRule) IAlgebraicRewriteRule(org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule) LinkedList(java.util.LinkedList)

Example 17 with IAlgebraicRewriteRule

use of org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule in project asterixdb by apache.

the class PigletRewriteRuleset method buildOpPushDownRuleCollection.

public static final List<IAlgebraicRewriteRule> buildOpPushDownRuleCollection() {
    List<IAlgebraicRewriteRule> opPushDown = new LinkedList<IAlgebraicRewriteRule>();
    opPushDown.add(new PushProjectDownRule());
    opPushDown.add(new PushSelectDownRule());
    return opPushDown;
}
Also used : PushProjectDownRule(org.apache.hyracks.algebricks.rewriter.rules.PushProjectDownRule) IAlgebraicRewriteRule(org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule) LinkedList(java.util.LinkedList) PushSelectDownRule(org.apache.hyracks.algebricks.rewriter.rules.PushSelectDownRule)

Example 18 with IAlgebraicRewriteRule

use of org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule in project asterixdb by apache.

the class PigletRewriteRuleset method buildJoinInferenceRuleCollection.

public static final List<IAlgebraicRewriteRule> buildJoinInferenceRuleCollection() {
    List<IAlgebraicRewriteRule> joinInference = new LinkedList<IAlgebraicRewriteRule>();
    joinInference.add(new InlineVariablesRule());
    joinInference.add(new ComplexJoinInferenceRule());
    return joinInference;
}
Also used : ComplexJoinInferenceRule(org.apache.hyracks.algebricks.rewriter.rules.ComplexJoinInferenceRule) IAlgebraicRewriteRule(org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule) InlineVariablesRule(org.apache.hyracks.algebricks.rewriter.rules.InlineVariablesRule) LinkedList(java.util.LinkedList)

Example 19 with IAlgebraicRewriteRule

use of org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule in project asterixdb by apache.

the class PigletRewriteRuleset method buildDataExchangeRuleCollection.

public static final List<IAlgebraicRewriteRule> buildDataExchangeRuleCollection() {
    List<IAlgebraicRewriteRule> dataExchange = new LinkedList<IAlgebraicRewriteRule>();
    dataExchange.add(new SetExecutionModeRule());
    return dataExchange;
}
Also used : SetExecutionModeRule(org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule) IAlgebraicRewriteRule(org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule) LinkedList(java.util.LinkedList)

Example 20 with IAlgebraicRewriteRule

use of org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule in project asterixdb by apache.

the class PigletRewriteRuleset method buildNormalizationRuleCollection.

public static final List<IAlgebraicRewriteRule> buildNormalizationRuleCollection() {
    List<IAlgebraicRewriteRule> normalization = new LinkedList<IAlgebraicRewriteRule>();
    normalization.add(new EliminateSubplanRule());
    // TODO: This rule is incorrect and has been removed. Its replacement in
    // Asterix (PushAggFuncIntoStandaloneAggregateRule)
    // is language-specific.
    // normalization.add(new IntroduceGroupByForStandaloneAggregRule());
    normalization.add(new BreakSelectIntoConjunctsRule());
    normalization.add(new PushSelectIntoJoinRule());
    normalization.add(new ExtractGbyExpressionsRule());
    return normalization;
}
Also used : IAlgebraicRewriteRule(org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule) BreakSelectIntoConjunctsRule(org.apache.hyracks.algebricks.rewriter.rules.BreakSelectIntoConjunctsRule) PushSelectIntoJoinRule(org.apache.hyracks.algebricks.rewriter.rules.PushSelectIntoJoinRule) ExtractGbyExpressionsRule(org.apache.hyracks.algebricks.rewriter.rules.ExtractGbyExpressionsRule) LinkedList(java.util.LinkedList) EliminateSubplanRule(org.apache.hyracks.algebricks.rewriter.rules.subplan.EliminateSubplanRule)

Aggregations

IAlgebraicRewriteRule (org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule)31 LinkedList (java.util.LinkedList)25 RemoveUnusedAssignAndAggregateRule (org.apache.hyracks.algebricks.rewriter.rules.RemoveUnusedAssignAndAggregateRule)7 ArrayList (java.util.ArrayList)5 Pair (org.apache.hyracks.algebricks.common.utils.Pair)4 SequentialOnceRuleController (org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialOnceRuleController)4 PushProjectDownRule (org.apache.hyracks.algebricks.rewriter.rules.PushProjectDownRule)4 PushSelectDownRule (org.apache.hyracks.algebricks.rewriter.rules.PushSelectDownRule)4 SetExecutionModeRule (org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule)4 EliminateSubplanRule (org.apache.hyracks.algebricks.rewriter.rules.subplan.EliminateSubplanRule)4 ConstantFoldingRule (org.apache.asterix.optimizer.rules.ConstantFoldingRule)3 ConsolidateAssignsRule (org.apache.hyracks.algebricks.rewriter.rules.ConsolidateAssignsRule)3 CopyLimitDownRule (org.apache.hyracks.algebricks.rewriter.rules.CopyLimitDownRule)3 InferTypesRule (org.apache.hyracks.algebricks.rewriter.rules.InferTypesRule)3 List (java.util.List)2 AsterixInlineVariablesRule (org.apache.asterix.optimizer.rules.AsterixInlineVariablesRule)2 ByNameToByIndexFieldAccessRule (org.apache.asterix.optimizer.rules.ByNameToByIndexFieldAccessRule)2 IntroduceDynamicTypeCastForExternalFunctionRule (org.apache.asterix.optimizer.rules.IntroduceDynamicTypeCastForExternalFunctionRule)2 IntroduceDynamicTypeCastRule (org.apache.asterix.optimizer.rules.IntroduceDynamicTypeCastRule)2 RemoveRedundantListifyRule (org.apache.asterix.optimizer.rules.RemoveRedundantListifyRule)2