-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
…s wrong value
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ | |
public class EnumerableBatchNestedLoopJoin extends Join implements EnumerableRel { | ||
|
||
private final ImmutableBitSet requiredColumns; | ||
private final @Nullable Double originRowCount; | ||
protected EnumerableBatchNestedLoopJoin( | ||
RelOptCluster cluster, | ||
RelTraitSet traits, | ||
|
@@ -63,18 +64,32 @@ protected EnumerableBatchNestedLoopJoin( | |
RexNode condition, | ||
Set<CorrelationId> variablesSet, | ||
ImmutableBitSet requiredColumns, | ||
JoinRelType joinType) { | ||
JoinRelType joinType, | ||
double originRowCount) { | ||
super(cluster, traits, ImmutableList.of(), left, right, condition, variablesSet, joinType); | ||
this.requiredColumns = requiredColumns; | ||
this.originRowCount = originRowCount; | ||
} | ||
|
||
@Deprecated | ||
public static EnumerableBatchNestedLoopJoin create( | ||
RelNode left, | ||
RelNode right, | ||
RexNode condition, | ||
ImmutableBitSet requiredColumns, | ||
Set<CorrelationId> variablesSet, | ||
JoinRelType joinType) { | ||
return create(left, right, condition, requiredColumns, variablesSet, joinType, null); | ||
} | ||
|
||
public static EnumerableBatchNestedLoopJoin create( | ||
RelNode left, | ||
RelNode right, | ||
RexNode condition, | ||
ImmutableBitSet requiredColumns, | ||
Set<CorrelationId> variablesSet, | ||
JoinRelType joinType, | ||
@Nullable Double originRowCount) { | ||
final RelOptCluster cluster = left.getCluster(); | ||
final RelMetadataQuery mq = cluster.getMetadataQuery(); | ||
final RelTraitSet traitSet = | ||
|
@@ -89,9 +104,11 @@ public static EnumerableBatchNestedLoopJoin create( | |
condition, | ||
variablesSet, | ||
requiredColumns, | ||
joinType); | ||
joinType, | ||
originRowCount); | ||
Check failure on line 108 in core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java GitHub Actions / CheckerFramework (JDK 11), oldest Guava
Check failure on line 108 in core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java GitHub Actions / CheckerFramework (JDK 11)
|
||
} | ||
|
||
|
||
@Override public @Nullable Pair<RelTraitSet, List<RelTraitSet>> passThroughTraits( | ||
final RelTraitSet required) { | ||
return EnumerableTraitsUtils.passThroughTraitsForJoin( | ||
|
@@ -115,8 +132,8 @@ public static EnumerableBatchNestedLoopJoin create( | |
@Override public EnumerableBatchNestedLoopJoin copy(RelTraitSet traitSet, | ||
RexNode condition, RelNode left, RelNode right, JoinRelType joinType, | ||
boolean semiJoinDone) { | ||
return new EnumerableBatchNestedLoopJoin(getCluster(), traitSet, | ||
left, right, condition, variablesSet, requiredColumns, joinType); | ||
return new EnumerableBatchNestedLoopJoin(getCluster(), traitSet, left, right, condition, | ||
variablesSet, requiredColumns, joinType, originRowCount); | ||
Check failure on line 136 in core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java GitHub Actions / CheckerFramework (JDK 11), oldest Guava
Check failure on line 136 in core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java GitHub Actions / CheckerFramework (JDK 11)
|
||
} | ||
|
||
@Override public @Nullable RelOptCost computeSelfCost( | ||
|
@@ -149,6 +166,10 @@ public static EnumerableBatchNestedLoopJoin create( | |
return pw.item("batchSize", variablesSet.size()); | ||
} | ||
|
||
public Double getOriginRowCount() { | ||
return originRowCount; | ||
Check failure on line 170 in core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java GitHub Actions / CheckerFramework (JDK 11), oldest Guava
Check failure on line 170 in core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java GitHub Actions / CheckerFramework (JDK 11)
|
||
} | ||
|
||
@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { | ||
final BlockBuilder builder = new BlockBuilder(); | ||
final Result leftResult = | ||
|