Jackie-Jiang commented on code in PR #11696:
URL: https://github.com/apache/pinot/pull/11696#discussion_r1339090214
##########
pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotJoinToDynamicBroadcastRule.java:
##########
@@ -134,17 +133,18 @@ public boolean matches(RelOptRuleCall call) {
PinotHintOptions.JOIN_HINT_OPTIONS,
PinotHintOptions.JoinHintOptions.JOIN_STRATEGY);
List<String> joinStrategies = joinStrategyString != null ?
StringUtils.split(joinStrategyString, ",")
: Collections.emptyList();
- if (!joinStrategies.contains(DYNAMIC_BROADCAST_HINT_OPTION_VALUE)) {
- return false;
- }
+ boolean explicitOtherStrategy = joinStrategies.size() > 0
+ &&
!joinStrategies.contains(PinotHintOptions.JoinHintOptions.DYNAMIC_BROADCAST_JOIN_STRATEGY);
+
JoinInfo joinInfo = join.analyzeCondition();
RelNode left = join.getLeft() instanceof HepRelVertex ? ((HepRelVertex)
join.getLeft()).getCurrentRel()
: join.getLeft();
RelNode right = join.getRight() instanceof HepRelVertex ? ((HepRelVertex)
join.getRight()).getCurrentRel()
: join.getRight();
return left instanceof Exchange && right instanceof Exchange
&& PinotRuleUtils.noExchangeInSubtree(left.getInput(0))
- && (join.getJoinType() == JoinRelType.SEMI &&
joinInfo.nonEquiConditions.isEmpty());
+ // default enable dynamic broadcast for SEMI join unless other join
strategy were specified
+ && (!explicitOtherStrategy && join.getJoinType() == JoinRelType.SEMI
&& joinInfo.nonEquiConditions.isEmpty());
Review Comment:
Is dynamic broadcast useful for non-SEMI join? Currently it won't be applied
even if we explicitly hint about it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]