Search in sources :

Example 1 with SetExecutionModeRule

use of org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule in project asterixdb by apache.

the class RuleCollections method buildDataExchangeRuleCollection.

public static final List<IAlgebraicRewriteRule> buildDataExchangeRuleCollection() {
    List<IAlgebraicRewriteRule> dataExchange = new LinkedList<>();
    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 2 with SetExecutionModeRule

use of org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule in project asterixdb by apache.

the class RuleCollections method prepareForJobGenRuleCollection.

public static final List<IAlgebraicRewriteRule> prepareForJobGenRuleCollection() {
    List<IAlgebraicRewriteRule> prepareForJobGenRewrites = new LinkedList<>();
    prepareForJobGenRewrites.add(new IsolateHyracksOperatorsRule(HeuristicOptimizer.hyraxOperatorsBelowWhichJobGenIsDisabled));
    prepareForJobGenRewrites.add(new ExtractCommonOperatorsRule());
    // Re-infer all types, so that, e.g., the effect of not-is-null is
    // propagated.
    prepareForJobGenRewrites.add(new ReinferAllTypesRule());
    prepareForJobGenRewrites.add(new PushGroupByIntoSortRule());
    prepareForJobGenRewrites.add(new SetExecutionModeRule());
    prepareForJobGenRewrites.add(new SweepIllegalNonfunctionalFunctions());
    return prepareForJobGenRewrites;
}
Also used : IsolateHyracksOperatorsRule(org.apache.hyracks.algebricks.rewriter.rules.IsolateHyracksOperatorsRule) SetExecutionModeRule(org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule) IAlgebraicRewriteRule(org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule) ExtractCommonOperatorsRule(org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonOperatorsRule) PushGroupByIntoSortRule(org.apache.hyracks.algebricks.rewriter.rules.PushGroupByIntoSortRule) ReinferAllTypesRule(org.apache.hyracks.algebricks.rewriter.rules.ReinferAllTypesRule) SweepIllegalNonfunctionalFunctions(org.apache.asterix.optimizer.rules.SweepIllegalNonfunctionalFunctions) LinkedList(java.util.LinkedList)

Example 3 with SetExecutionModeRule

use of org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule in project asterixdb by apache.

the class RuleCollections method buildPhysicalRewritesTopLevelRuleCollection.

public static final List<IAlgebraicRewriteRule> buildPhysicalRewritesTopLevelRuleCollection(ICcApplicationContext appCtx) {
    List<IAlgebraicRewriteRule> physicalRewritesTopLevel = new LinkedList<>();
    physicalRewritesTopLevel.add(new PushNestedOrderByUnderPreSortedGroupByRule());
    physicalRewritesTopLevel.add(new CopyLimitDownRule());
    // CopyLimitDownRule may generates non-topmost limits with numeric_adds functions.
    // We are going to apply a constant folding rule again for this case.
    physicalRewritesTopLevel.add(new ConstantFoldingRule(appCtx));
    physicalRewritesTopLevel.add(new PushLimitIntoOrderByRule());
    physicalRewritesTopLevel.add(new IntroduceProjectsRule());
    physicalRewritesTopLevel.add(new SetAlgebricksPhysicalOperatorsRule());
    physicalRewritesTopLevel.add(new IntroduceRapidFrameFlushProjectAssignRule());
    physicalRewritesTopLevel.add(new SetExecutionModeRule());
    physicalRewritesTopLevel.add(new IntroduceRandomPartitioningFeedComputationRule());
    return physicalRewritesTopLevel;
}
Also used : PushNestedOrderByUnderPreSortedGroupByRule(org.apache.hyracks.algebricks.rewriter.rules.PushNestedOrderByUnderPreSortedGroupByRule) ConstantFoldingRule(org.apache.asterix.optimizer.rules.ConstantFoldingRule) CopyLimitDownRule(org.apache.hyracks.algebricks.rewriter.rules.CopyLimitDownRule) PushLimitIntoOrderByRule(org.apache.asterix.optimizer.rules.PushLimitIntoOrderByRule) IntroduceRandomPartitioningFeedComputationRule(org.apache.asterix.optimizer.rules.IntroduceRandomPartitioningFeedComputationRule) SetExecutionModeRule(org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule) IAlgebraicRewriteRule(org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule) IntroduceProjectsRule(org.apache.hyracks.algebricks.rewriter.rules.IntroduceProjectsRule) LinkedList(java.util.LinkedList) SetAlgebricksPhysicalOperatorsRule(org.apache.hyracks.algebricks.rewriter.rules.SetAlgebricksPhysicalOperatorsRule) IntroduceRapidFrameFlushProjectAssignRule(org.apache.asterix.optimizer.rules.IntroduceRapidFrameFlushProjectAssignRule)

Example 4 with SetExecutionModeRule

use of org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule 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)

Aggregations

LinkedList (java.util.LinkedList)4 IAlgebraicRewriteRule (org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule)4 SetExecutionModeRule (org.apache.hyracks.algebricks.rewriter.rules.SetExecutionModeRule)4 ConstantFoldingRule (org.apache.asterix.optimizer.rules.ConstantFoldingRule)1 IntroduceRandomPartitioningFeedComputationRule (org.apache.asterix.optimizer.rules.IntroduceRandomPartitioningFeedComputationRule)1 IntroduceRapidFrameFlushProjectAssignRule (org.apache.asterix.optimizer.rules.IntroduceRapidFrameFlushProjectAssignRule)1 PushLimitIntoOrderByRule (org.apache.asterix.optimizer.rules.PushLimitIntoOrderByRule)1 SweepIllegalNonfunctionalFunctions (org.apache.asterix.optimizer.rules.SweepIllegalNonfunctionalFunctions)1 CopyLimitDownRule (org.apache.hyracks.algebricks.rewriter.rules.CopyLimitDownRule)1 ExtractCommonOperatorsRule (org.apache.hyracks.algebricks.rewriter.rules.ExtractCommonOperatorsRule)1 IntroduceProjectsRule (org.apache.hyracks.algebricks.rewriter.rules.IntroduceProjectsRule)1 IsolateHyracksOperatorsRule (org.apache.hyracks.algebricks.rewriter.rules.IsolateHyracksOperatorsRule)1 PushGroupByIntoSortRule (org.apache.hyracks.algebricks.rewriter.rules.PushGroupByIntoSortRule)1 PushNestedOrderByUnderPreSortedGroupByRule (org.apache.hyracks.algebricks.rewriter.rules.PushNestedOrderByUnderPreSortedGroupByRule)1 ReinferAllTypesRule (org.apache.hyracks.algebricks.rewriter.rules.ReinferAllTypesRule)1 SetAlgebricksPhysicalOperatorsRule (org.apache.hyracks.algebricks.rewriter.rules.SetAlgebricksPhysicalOperatorsRule)1