Java Code Examples for org.apache.calcite.rel.core.RelFactories#LOGICAL_BUILDER

The following examples show how to use org.apache.calcite.rel.core.RelFactories#LOGICAL_BUILDER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SortLimitPushRule.java    From Mycat2 with GNU General Public License v3.0 5 votes vote down vote up
public SortLimitPushRule() {
    super(
            operandJ(Sort.class,null, (Predicate<Sort>) call -> {
                        if (call!=null) {
                            if ( call.isDistinct() ||
                                    (call.getChildExps() == null || call.getChildExps().isEmpty())) {
                                return false;
                            }
                        }
                        return true;
                    },
                    operand(Union.class, any())),
            RelFactories.LOGICAL_BUILDER, "SortLimitPushRule");
}
 
Example 2
Source File: EnumerableCalcRule.java    From calcite with Apache License 2.0 5 votes vote down vote up
EnumerableCalcRule() {
  // The predicate ensures that if there's a multiset, FarragoMultisetSplitter
  // will work on it first.
  super(LogicalCalc.class,
      (Predicate<Calc>) RelOptUtil::notContainsWindowedAgg,
      Convention.NONE, EnumerableConvention.INSTANCE,
      RelFactories.LOGICAL_BUILDER, "EnumerableCalcRule");
}
 
Example 3
Source File: FilterTableScanRule.java    From Bats with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
protected FilterTableScanRule(RelOptRuleOperand operand, String description) {
  this(operand, RelFactories.LOGICAL_BUILDER, description);
}
 
Example 4
Source File: PruneEmptyRules.java    From calcite with Apache License 2.0 4 votes vote down vote up
/** Creates a simple RemoveEmptySingleRule. */
public <R extends SingleRel> RemoveEmptySingleRule(Class<R> clazz,
    String description) {
  this(clazz, (Predicate<R>) singleRel -> true, RelFactories.LOGICAL_BUILDER,
      description);
}
 
Example 5
Source File: SortProjectTransposeRule.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public SortProjectTransposeRule(
    Class<? extends Sort> sortClass,
    Class<? extends Project> projectClass) {
  this(sortClass, projectClass, RelFactories.LOGICAL_BUILDER, null);
}
 
Example 6
Source File: AggregateRemoveRule.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public AggregateRemoveRule(Class<? extends Aggregate> aggregateClass) {
  this(aggregateClass, RelFactories.LOGICAL_BUILDER);
}
 
Example 7
Source File: AggregateRemoveRule.java    From Bats with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public AggregateRemoveRule(Class<? extends Aggregate> aggregateClass) {
  this(aggregateClass, RelFactories.LOGICAL_BUILDER);
}
 
Example 8
Source File: SortRemoveConstantKeysRule.java    From calcite with Apache License 2.0 4 votes vote down vote up
private SortRemoveConstantKeysRule() {
  super(
      operand(Sort.class, any()),
      RelFactories.LOGICAL_BUILDER, "SortRemoveConstantKeysRule");
}
 
Example 9
Source File: EnumerableTableFunctionScanRule.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public EnumerableTableFunctionScanRule() {
  this(RelFactories.LOGICAL_BUILDER);
}
 
Example 10
Source File: JoinCalcTransposeRule.java    From quark with Apache License 2.0 4 votes vote down vote up
public JoinCalcTransposeRule(
    RelOptRuleOperand operand,
    String description) {
  super(operand, RelFactories.LOGICAL_BUILDER, description);
}
 
Example 11
Source File: JdbcRules.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public JdbcProjectRule(final JdbcConvention out) {
  this(out, RelFactories.LOGICAL_BUILDER);
}
 
Example 12
Source File: EnumerableFilterRule.java    From calcite with Apache License 2.0 4 votes vote down vote up
EnumerableFilterRule() {
  super(LogicalFilter.class,
      (Predicate<LogicalFilter>) RelOptUtil::notContainsWindowedAgg,
      Convention.NONE, EnumerableConvention.INSTANCE,
      RelFactories.LOGICAL_BUILDER, "EnumerableFilterRule");
}
 
Example 13
Source File: SplunkPushDownRule.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
protected SplunkPushDownRule(RelOptRuleOperand rule, String id) {
  this(rule, RelFactories.LOGICAL_BUILDER, id);
}
 
Example 14
Source File: MultiJoinProjectTransposeRule.java    From Bats with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public MultiJoinProjectTransposeRule(
    RelOptRuleOperand operand,
    String description) {
  this(operand, RelFactories.LOGICAL_BUILDER, description);
}
 
Example 15
Source File: FilterTableScanRule.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
protected FilterTableScanRule(RelOptRuleOperand operand, String description) {
  this(operand, RelFactories.LOGICAL_BUILDER, description);
}
 
Example 16
Source File: SortProjectTransposeRule.java    From Bats with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public SortProjectTransposeRule(
    Class<? extends Sort> sortClass,
    Class<? extends Project> projectClass) {
  this(sortClass, projectClass, RelFactories.LOGICAL_BUILDER, null);
}
 
Example 17
Source File: EnumerableTableScanRule.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public EnumerableTableScanRule() {
  this(RelFactories.LOGICAL_BUILDER);
}
 
Example 18
Source File: SubstitutionVisitor.java    From Bats with Apache License 2.0 4 votes vote down vote up
/** Creates a SubstitutionVisitor with the default rule set. */
public SubstitutionVisitor(RelNode target_, RelNode query_) {
    this(target_, query_, DEFAULT_RULES, RelFactories.LOGICAL_BUILDER);
}
 
Example 19
Source File: JdbcRules.java    From calcite with Apache License 2.0 4 votes vote down vote up
@Deprecated // to be removed before 2.0
public JdbcUnionRule(JdbcConvention out) {
  this(out, RelFactories.LOGICAL_BUILDER);
}
 
Example 20
Source File: ConverterRule.java    From Bats with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a <code>ConverterRule</code>.
 *
 * @param clazz       Type of relational expression to consider converting
 * @param in          Trait of relational expression to consider converting
 * @param out         Trait which is converted to
 * @param description Description of rule
 */
public ConverterRule(Class<? extends RelNode> clazz, RelTrait in,
    RelTrait out, String description) {
  this(clazz, (Predicate<RelNode>) r -> true, in, out,
      RelFactories.LOGICAL_BUILDER, description);
}