alamb commented on code in PR #12985:
URL: https://github.com/apache/datafusion/pull/12985#discussion_r1806924745


##########
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:
   Maybe we can just remove the comment



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to