Skip to content

Commit

Permalink
delete runtime filter code
Browse files Browse the repository at this point in the history
Signed-off-by: before-Sunrise <[email protected]>
  • Loading branch information
before-Sunrise committed Feb 11, 2025
1 parent 604b9cd commit 7c2ebbf
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 39 deletions.
21 changes: 1 addition & 20 deletions fe/fe-core/src/main/java/com/starrocks/planner/HashJoinNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
* a single input tuple.
*/
public class HashJoinNode extends JoinNode {
private boolean isSkewJoin = false;

public HashJoinNode(PlanNodeId id, PlanNode outer, PlanNode inner, TableRef innerRef,
List<Expr> eqJoinConjuncts, List<Expr> otherJoinConjuncts) {
super("HASH JOIN", id, outer, inner, innerRef, eqJoinConjuncts, otherJoinConjuncts);
Expand All @@ -71,24 +69,7 @@ public HashJoinNode(PlanNodeId id, PlanNode outer, PlanNode inner, JoinOperator
List<Expr> eqJoinConjuncts, List<Expr> otherJoinConjuncts) {
super("HASH JOIN", id, outer, inner, joinOp, eqJoinConjuncts, otherJoinConjuncts);
}

public boolean isSkewJoin() {
return isSkewJoin;
}

public void setSkewJoin(boolean skewJoin) {
isSkewJoin =
skewJoin && ConnectContext.get().getSessionVariable().isEnableOptimizerSkewJoinByBroadCastSkewValues();
}

public boolean isSkewShuffleJoin() {
return isSkewJoin() && distrMode == DistributionMode.PARTITIONED;
}

public boolean isSkewBroadJoin() {
return isSkewJoin() && distrMode == DistributionMode.BROADCAST;
}


@Override
protected void toThrift(TPlanNode msg) {
msg.node_type = TPlanNodeType.HASH_JOIN_NODE;
Expand Down
8 changes: 0 additions & 8 deletions fe/fe-core/src/main/java/com/starrocks/planner/JoinNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,6 @@ public void buildRuntimeFilters(IdGenerator<RuntimeFilterId> runtimeFilterIdIdGe
}
}

// todo: skew join support rf(will support later)
if (this instanceof HashJoinNode) {
HashJoinNode hashJoinNode = (HashJoinNode) this;
if (hashJoinNode.isSkewBroadJoin() || hashJoinNode.isSkewShuffleJoin()) {
return;
}
}

for (int i = 0; i < eqJoinConjuncts.size(); ++i) {
BinaryPredicate joinConjunct = eqJoinConjuncts.get(i);
Preconditions.checkArgument(BinaryPredicate.IS_EQ_NULL_PREDICATE.apply(joinConjunct) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package com.starrocks.sql.optimizer.operator.physical;

import com.starrocks.analysis.JoinOperator;
import com.starrocks.planner.HashJoinNode;
import com.starrocks.sql.optimizer.OptExpression;
import com.starrocks.sql.optimizer.OptExpressionVisitor;
import com.starrocks.sql.optimizer.operator.OperatorType;
Expand All @@ -29,8 +28,6 @@
public class PhysicalHashJoinOperator extends PhysicalJoinOperator {
private ScalarOperator skewColumn;
private List<ScalarOperator> skewValues;
private PhysicalHashJoinOperator skewJoinFriend;
private HashJoinNode mySelfAsNode;
public PhysicalHashJoinOperator(JoinOperator joinType,
ScalarOperator onPredicate,
String joinHint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2841,10 +2841,6 @@ private PlanFragment visitPhysicalJoin(PlanFragment leftFragment, PlanFragment r
joinNode.setUkfkProperty(joinProperty);
}
}

PhysicalHashJoinOperator physicalHashJoinOperator = (PhysicalHashJoinOperator) node;
HashJoinNode hashJoinNode = (HashJoinNode) joinNode;
hashJoinNode.setSkewJoin(physicalHashJoinOperator.getSkewColumn() != null);
} else if (node instanceof PhysicalMergeJoinOperator) {
joinNode = new MergeJoinNode(
context.getNextNodeId(),
Expand Down
4 changes: 0 additions & 4 deletions gensrc/proto/internal_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ message PTransmitRuntimeFilterParams {
// When merge node starts to broadcast this rf(millseconds since unix epoch).
optional int64 broadcast_timestamp = 10;
optional bool is_pipeline = 11;
// 12,13,14 only used for skew join optimization
optional bool is_skew_broadcast_join = 12;
optional PTypeDesc columnType = 13;
optional int32 skew_shuffle_filter_id = 14;
};

message PTransmitRuntimeFilterResult {
Expand Down

0 comments on commit 7c2ebbf

Please sign in to comment.