Package com.twilio.kudu.sql.rules
Class KuduSortedAggregationRule
- java.lang.Object
-
- org.apache.calcite.plan.RelOptRule
-
- com.twilio.kudu.sql.rules.KuduSortRule
-
- com.twilio.kudu.sql.rules.KuduSortedAggregationRule
-
public class KuduSortedAggregationRule extends KuduSortRule
Rule that matches a sort over an aggregation with both sort and aggregation using the same columns. The columns must be a prefix of the primary key of the table. This rule eliminates the need for sorting on the client.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.twilio.kudu.sql.rules.KuduSortRule
KuduSortRule.KuduFilterVisitor, KuduSortRule.KuduSortWithFilter, KuduSortRule.KuduSortWithoutFilter
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.calcite.plan.RelOptRule
SORTED_AGGREGATION_RULE
-
Fields inherited from class com.twilio.kudu.sql.rules.KuduSortRule
FILTER_SORT_RULE, pkSortColumns, SIMPLE_SORT_RULE
-
-
Constructor Summary
Constructors Constructor Description KuduSortedAggregationRule(org.apache.calcite.tools.RelBuilderFactory relBuilderFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onMatch(org.apache.calcite.plan.RelOptRuleCall call)
protected void
perform(org.apache.calcite.plan.RelOptRuleCall call, org.apache.calcite.rel.core.Sort originalSort, org.apache.calcite.rel.core.Aggregate originalAggregate, KuduToEnumerableRel kuduToEnumerableRel, org.apache.calcite.rel.core.Project project, org.apache.calcite.rel.core.Filter filter, KuduQuery query)
-
Methods inherited from class com.twilio.kudu.sql.rules.KuduSortRule
canApply, perform
-
Methods inherited from class org.apache.calcite.plan.RelOptRule
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
-
-
-
-
Method Detail
-
perform
protected void perform(org.apache.calcite.plan.RelOptRuleCall call, org.apache.calcite.rel.core.Sort originalSort, org.apache.calcite.rel.core.Aggregate originalAggregate, KuduToEnumerableRel kuduToEnumerableRel, org.apache.calcite.rel.core.Project project, org.apache.calcite.rel.core.Filter filter, KuduQuery query)
-
onMatch
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call)
- Specified by:
onMatch
in classorg.apache.calcite.plan.RelOptRule
-
-