You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/11 04:17:06 UTC

[GitHub] [arrow-datafusion] jackwener commented on a diff in pull request #4866: Support non-equijoin predicate for EliminateCrossJoin

jackwener commented on code in PR #4866:
URL: https://github.com/apache/arrow-datafusion/pull/4866#discussion_r1066558084


##########
datafusion/optimizer/src/eliminate_cross_join.rs:
##########
@@ -176,159 +178,138 @@ fn flatten_join_inputs(
 fn find_inner_join(
     left_input: &LogicalPlan,
     rights: &mut Vec<LogicalPlan>,
-    possible_join_keys: &mut Vec<(Expr, Expr)>,
-    all_join_keys: &mut HashSet<(Expr, Expr)>,
+    possible_join_predicates: &mut Vec<Expr>,
 ) -> Result<LogicalPlan> {
+    let mut candidate_right_input: Option<(usize, Vec<Expr>)> = None;
     for (i, right_input) in rights.iter().enumerate() {
-        let mut join_keys = vec![];
-
-        for (l, r) in &mut *possible_join_keys {
-            let key_pair = find_valid_equijoin_key_pair(
-                l,
-                r,
-                left_input.schema().clone(),
-                right_input.schema().clone(),
-            )?;
+        let predicate_schemas =

Review Comment:
   we should find column compare pair. like `t1.a > t2.a` or `t1.a > t2.a + 1`.
   If left or right don't contains column, we shouldn't put them into join_filter.



-- 
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-unsubscribe@arrow.apache.org

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