Dandandan commented on code in PR #12985:
URL: https://github.com/apache/datafusion/pull/12985#discussion_r1806808879
##########
datafusion/core/src/physical_planner.rs:
##########
@@ -1045,14 +1045,19 @@ impl DefaultPhysicalPlanner {
session_state.config_options().optimizer.prefer_hash_join;
let join: Arc<dyn ExecutionPlan> = if join_on.is_empty() {
- // there is no equal join condition, use the nested loop
join
- // TODO optimize the plan, and use the config of
`target_partitions` and `repartition_joins`
- Arc::new(NestedLoopJoinExec::try_new(
- physical_left,
- physical_right,
- join_filter,
- join_type,
- )?)
+ if join_filter.is_none() && matches!(join_type,
JoinType::Inner) {
+ // no on and filter, use cross join
+ Arc::new(CrossJoinExec::new(physical_left,
physical_right))
+ } else {
+ // there is no equal join condition, use the nested
loop join
+ // TODO optimize the plan, and use the config of
`target_partitions` and `repartition_joins`
Review Comment:
I am not sure what the comment means, it was copied. I think
`repartition_joins` is not needed for `NestedLoopJoin` and `target_partitions`
should be already used on child plans...
--
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]