ruleList.add(StreamingWindowPrule.INSTANCE);
ruleList.add(PushLimitToTopN.INSTANCE);
ruleList.add(UnionAllPrule.INSTANCE);
// ruleList.add(UnionDistinctPrule.INSTANCE);
PlannerSettings ps = qcontext.getPlannerSettings();
if (ps.isHashAggEnabled()) {
ruleList.add(HashAggPrule.INSTANCE);
}
if (ps.isStreamAggEnabled()) {
ruleList.add(StreamAggPrule.INSTANCE);
}
if (ps.isHashJoinEnabled()) {
ruleList.add(HashJoinPrule.INSTANCE);
}
if (ps.isMergeJoinEnabled()) {
ruleList.add(MergeJoinPrule.INSTANCE);
}
return new DrillRuleSet(ImmutableSet.copyOf(ruleList));
}