Java Code Examples for org.apache.calcite.rel.core.CorrelationId#setOf()

The following examples show how to use org.apache.calcite.rel.core.CorrelationId#setOf() . 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: JoinRelBase.java    From dremio-oss with Apache License 2.0 6 votes vote down vote up
protected JoinRelBase(RelOptCluster cluster, RelTraitSet traits, RelNode left, RelNode right, RexNode condition,
                      JoinRelType joinType, ImmutableBitSet projectedFields) {
  super(cluster, traits, left, right, condition, CorrelationId.setOf(Collections.emptySet()), joinType);
  leftKeys = Lists.newArrayList();
  rightKeys = Lists.newArrayList();
  filterNulls = Lists.newArrayList();

  remaining = RelOptUtil.splitJoinCondition(left, right, condition, leftKeys, rightKeys, filterNulls);
  joinCategory = getJoinCategory(condition, leftKeys, rightKeys, filterNulls, remaining);

  this.projectedFields = projectedFields;
  if (projectedFields != null) {
    List<RelDataType> fields = getRowType().getFieldList().stream().map(RelDataTypeField::getType).collect(Collectors.toList());
    List<String> names = ImmutableList.copyOf(getRowType().getFieldNames());
    inputRowType = cluster.getTypeFactory().createStructType(fields, names);
    rowType = JoinUtils.rowTypeFromProjected(left, right, getRowType(), projectedFields, cluster.getTypeFactory());
  }
}
 
Example 2
Source File: LogicalJoin.java    From Bats with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
public LogicalJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode left,
    RelNode right, RexNode condition, JoinRelType joinType,
    Set<String> variablesStopped, boolean semiJoinDone,
    ImmutableList<RelDataTypeField> systemFieldList) {
  this(cluster, traitSet, left, right, condition,
      CorrelationId.setOf(variablesStopped), joinType, semiJoinDone,
      systemFieldList);
}
 
Example 3
Source File: LogicalJoin.java    From Bats with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
public LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right,
    RexNode condition, JoinRelType joinType, Set<String> variablesStopped) {
  this(cluster, cluster.traitSetOf(Convention.NONE), left, right, condition,
      CorrelationId.setOf(variablesStopped), joinType, false,
      ImmutableList.of());
}
 
Example 4
Source File: LogicalJoin.java    From Bats with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
public LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right,
    RexNode condition, JoinRelType joinType, Set<String> variablesStopped,
    boolean semiJoinDone, ImmutableList<RelDataTypeField> systemFieldList) {
  this(cluster, cluster.traitSetOf(Convention.NONE), left, right, condition,
      CorrelationId.setOf(variablesStopped), joinType, semiJoinDone,
      systemFieldList);
}
 
Example 5
Source File: EquiJoin.java    From Bats with Apache License 2.0 5 votes vote down vote up
public EquiJoin(RelOptCluster cluster, RelTraitSet traits, RelNode left,
    RelNode right, RexNode condition, ImmutableIntList leftKeys,
    ImmutableIntList rightKeys, JoinRelType joinType,
    Set<String> variablesStopped) {
  super(cluster, traits, left, right, condition, leftKeys, rightKeys,
      CorrelationId.setOf(variablesStopped), joinType);
}
 
Example 6
Source File: LogicalJoin.java    From calcite with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
public LogicalJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode left,
    RelNode right, RexNode condition, JoinRelType joinType,
    Set<String> variablesStopped, boolean semiJoinDone,
    ImmutableList<RelDataTypeField> systemFieldList) {
  this(cluster, traitSet, ImmutableList.of(), left, right, condition,
      CorrelationId.setOf(variablesStopped), joinType, semiJoinDone,
      systemFieldList);
}
 
Example 7
Source File: LogicalJoin.java    From calcite with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
public LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right,
    RexNode condition, JoinRelType joinType, Set<String> variablesStopped) {
  this(cluster, cluster.traitSetOf(Convention.NONE), ImmutableList.of(),
      left, right, condition, CorrelationId.setOf(variablesStopped),
      joinType, false, ImmutableList.of());
}
 
Example 8
Source File: LogicalJoin.java    From calcite with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
public LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right,
    RexNode condition, JoinRelType joinType, Set<String> variablesStopped,
    boolean semiJoinDone, ImmutableList<RelDataTypeField> systemFieldList) {
  this(cluster, cluster.traitSetOf(Convention.NONE), ImmutableList.of(),
      left, right, condition, CorrelationId.setOf(variablesStopped), joinType,
      semiJoinDone, systemFieldList);
}
 
Example 9
Source File: EquiJoin.java    From calcite with Apache License 2.0 5 votes vote down vote up
public EquiJoin(RelOptCluster cluster, RelTraitSet traits, RelNode left,
    RelNode right, RexNode condition, ImmutableIntList leftKeys,
    ImmutableIntList rightKeys, JoinRelType joinType,
    Set<String> variablesStopped) {
  super(cluster, traits, left, right, condition, leftKeys, rightKeys,
      CorrelationId.setOf(variablesStopped), joinType);
}
 
Example 10
Source File: JdbcRules.java    From calcite with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
protected JdbcJoin(
    RelOptCluster cluster,
    RelTraitSet traitSet,
    RelNode left,
    RelNode right,
    RexNode condition,
    JoinRelType joinType,
    Set<String> variablesStopped)
    throws InvalidRelException {
  this(cluster, traitSet, left, right, condition,
      CorrelationId.setOf(variablesStopped), joinType);
}
 
Example 11
Source File: EnumerableHashJoin.java    From calcite with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
protected EnumerableHashJoin(RelOptCluster cluster, RelTraitSet traits,
    RelNode left, RelNode right, RexNode condition, ImmutableIntList leftKeys,
    ImmutableIntList rightKeys, JoinRelType joinType,
    Set<String> variablesStopped) {
  this(cluster, traits, left, right, condition, CorrelationId.setOf(variablesStopped), joinType);
}
 
Example 12
Source File: EnumerableMergeJoin.java    From calcite with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
EnumerableMergeJoin(RelOptCluster cluster, RelTraitSet traits, RelNode left,
    RelNode right, RexNode condition, ImmutableIntList leftKeys,
    ImmutableIntList rightKeys, JoinRelType joinType,
    Set<String> variablesStopped) {
  this(cluster, traits, left, right, condition, leftKeys, rightKeys,
      CorrelationId.setOf(variablesStopped), joinType);
}
 
Example 13
Source File: EnumerableNestedLoopJoin.java    From calcite with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
protected EnumerableNestedLoopJoin(RelOptCluster cluster, RelTraitSet traits,
    RelNode left, RelNode right, RexNode condition, JoinRelType joinType,
    Set<String> variablesStopped) {
  this(cluster, traits, left, right, condition,
      CorrelationId.setOf(variablesStopped), joinType);
}
 
Example 14
Source File: Bindables.java    From calcite with Apache License 2.0 5 votes vote down vote up
@Deprecated // to be removed before 2.0
protected BindableJoin(RelOptCluster cluster, RelTraitSet traitSet,
    RelNode left, RelNode right, RexNode condition, JoinRelType joinType,
    Set<String> variablesStopped) {
  this(cluster, traitSet, left, right, condition,
      CorrelationId.setOf(variablesStopped), joinType);
}
 
Example 15
Source File: DrillJoinRelBase.java    From Bats with Apache License 2.0 4 votes vote down vote up
public DrillJoinRelBase(RelOptCluster cluster, RelTraitSet traits, RelNode left, RelNode right, RexNode condition,
    JoinRelType joinType) {
  super(cluster, traits, left, right, condition,
      CorrelationId.setOf(Collections.<String> emptySet()), joinType);
  this.joinRowFactor = PrelUtil.getPlannerSettings(cluster.getPlanner()).getRowCountEstimateFactor();
}