Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,13 @@ impl Rule for RuleExchangeJoin {
JoinPredicate::Right(pred) => {
join_6_preds.push(pred.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_4.left_conditions.push(left.clone());
join_4.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if equal {
join_4.left_conditions.push(left.clone());
join_4.right_conditions.push(right.clone());
} else {
join_4.non_equi_conditions.push(predicate.clone());
}
}
JoinPredicate::Other(pred) => {
join_4.non_equi_conditions.push(pred.clone());
Expand All @@ -192,9 +196,15 @@ impl Rule for RuleExchangeJoin {
// TODO(leiysky): push down the predicate
join_5.non_equi_conditions.push(predicate.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_5.left_conditions.push(left.clone());
join_5.right_conditions.push(right.clone());
JoinPredicate::Both {
left, right, equal, ..
} => {
if equal {
join_5.left_conditions.push(left.clone());
join_5.right_conditions.push(right.clone());
} else {
join_5.non_equi_conditions.push(predicate.clone());
}
}
}
}
Expand All @@ -211,9 +221,13 @@ impl Rule for RuleExchangeJoin {
// TODO(leiysky): push down the predicate
join_6.non_equi_conditions.push(predicate.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_6.left_conditions.push(left.clone());
join_6.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if equal {
join_6.left_conditions.push(left.clone());
join_6.right_conditions.push(right.clone());
} else {
join_6.non_equi_conditions.push(predicate.clone());
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,13 @@ impl Rule for RuleLeftAssociateJoin {
JoinPredicate::Right(pred) => {
join_4_preds.push(pred.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_3.left_conditions.push(left.clone());
join_3.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if !equal {
join_3.non_equi_conditions.push(predicate.clone());
} else {
join_3.left_conditions.push(left.clone());
join_3.right_conditions.push(right.clone());
}
}
JoinPredicate::Other(pred) => {
join_3.non_equi_conditions.push(pred.clone());
Expand All @@ -168,9 +172,13 @@ impl Rule for RuleLeftAssociateJoin {
// TODO(leiysky): push down the predicate
join_4.non_equi_conditions.push(predicate.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_4.left_conditions.push(left.clone());
join_4.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if equal {
join_4.left_conditions.push(left.clone());
join_4.right_conditions.push(right.clone());
} else {
join_4.non_equi_conditions.push(predicate.clone());
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,13 @@ impl Rule for RuleLeftExchangeJoin {
// TODO(leiysky): push down the predicate
join_3.non_equi_conditions.push(pred.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_3.left_conditions.push(left.clone());
join_3.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if equal {
join_3.left_conditions.push(left.clone());
join_3.right_conditions.push(right.clone());
} else {
join_3.non_equi_conditions.push(predicate.clone());
}
}
JoinPredicate::Other(pred) => {
join_3.non_equi_conditions.push(pred.clone());
Expand All @@ -166,9 +170,13 @@ impl Rule for RuleLeftExchangeJoin {
// TODO(leiysky): push down the predicate
join_4.non_equi_conditions.push(predicate.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_4.left_conditions.push(left.clone());
join_4.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if equal {
join_4.left_conditions.push(left.clone());
join_4.right_conditions.push(right.clone());
} else {
join_4.non_equi_conditions.push(predicate.clone());
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,13 @@ impl Rule for RuleRightAssociateJoin {
JoinPredicate::Left(pred) => {
join_4_preds.push(pred.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_3.left_conditions.push(left.clone());
join_3.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if equal {
join_3.left_conditions.push(left.clone());
join_3.right_conditions.push(right.clone());
} else {
join_3.non_equi_conditions.push(predicate.clone());
}
}
JoinPredicate::Other(pred) => {
join_3.non_equi_conditions.push(pred.clone());
Expand All @@ -164,9 +168,13 @@ impl Rule for RuleRightAssociateJoin {
// TODO(leiysky): push down the predicate
join_4.non_equi_conditions.push(predicate.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_4.left_conditions.push(left.clone());
join_4.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if equal {
join_4.left_conditions.push(left.clone());
join_4.right_conditions.push(right.clone());
} else {
join_4.non_equi_conditions.push(predicate.clone());
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,13 @@ impl Rule for RuleRightExchangeJoin {
JoinPredicate::Right(pred) => {
join_4_preds.push(pred.clone());
}
JoinPredicate::Both { left, right, .. } => {
join_3.left_conditions.push(left.clone());
join_3.right_conditions.push(right.clone());
JoinPredicate::Both { left, right, equal } => {
if equal {
join_3.left_conditions.push(left.clone());
join_3.right_conditions.push(right.clone());
} else {
join_3.non_equi_conditions.push(predicate.clone());
}
}
JoinPredicate::Other(pred) => {
join_3.non_equi_conditions.push(pred.clone());
Expand Down