walterddr commented on code in PR #9448:
URL: https://github.com/apache/pinot/pull/9448#discussion_r982963276
##########
pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotJoinExchangeNodeInsertRule.java:
##########
@@ -65,14 +62,14 @@ public void onMatch(RelOptRuleCall call) {
RelNode leftExchange;
RelNode rightExchange;
- List<RelHint> hints = join.getHints();
- if (hints.contains(PinotRelationalHints.USE_BROADCAST_DISTRIBUTE)) {
- // TODO: determine which side should be the broadcast table based on
table metadata
- // TODO: support SINGLETON exchange if the non-broadcast table size is
small enough to stay local.
- leftExchange = LogicalExchange.create(leftInput,
RelDistributions.RANDOM_DISTRIBUTED);
+ JoinInfo joinInfo = join.analyzeCondition();
+
+ if (joinInfo.leftKeys.isEmpty()) {
+ // when there's no JOIN key, use broadcast.
+ leftExchange = LogicalExchange.create(leftInput,
RelDistributions.SINGLETON);
Review Comment:
cost is not enabled. it is either zero or infinite right now. and yes the
assumption is correct.
--
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]