Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco committed Mar 23, 2024
1 parent 40776c9 commit 7e79920
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/core/src/operations/merge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,8 @@ async fn try_construct_early_filter(
None => Ok(None),
Some(filter) => {
if placeholders.is_empty() {
// if we haven't recognised any partition-based predicates in the join predicate, return our reduced filter
Ok(Some(filter))
// if we haven't recognised any partition-based predicates in the join predicate, return no filter
Ok(None)
} else {
// if we have some recognised partitions, then discover the distinct set of partitions in the source data and
// make a new filter, which expands out the placeholders for each distinct partition (and then OR these together)
Expand Down Expand Up @@ -1033,6 +1033,7 @@ async fn execute(
)
.await?
};

let target = match target_subset_filter.as_ref() {
None => target,
Some(subset_filter) => {
Expand Down Expand Up @@ -2063,7 +2064,6 @@ mod tests {
let commit_info = table.history(None).await.unwrap();
let last_commit = &commit_info[0];
let parameters = last_commit.operation_parameters.clone().unwrap();
assert_eq!(parameters["predicate"], "modified = '2021-02-02'");
assert_eq!(
parameters["mergePredicate"],
"target.id = source.id AND target.modified = '2021-02-02'"
Expand Down Expand Up @@ -2485,7 +2485,6 @@ mod tests {
let commit_info = table.history(None).await.unwrap();
let last_commit = &commit_info[0];
let parameters = last_commit.operation_parameters.clone().unwrap();
assert_eq!(parameters["predicate"], json!("modified = '2021-02-02'"));

let expected = vec![
"+----+-------+------------+",
Expand Down

0 comments on commit 7e79920

Please sign in to comment.