@@ -209,8 +209,7 @@ pub struct IncrementalJoin {
209
209
210
210
/// One side of an [`IncrementalJoin`].
211
211
///
212
- /// Holds the "physical" [`DbTable`] this side of the join operates on, as well
213
- /// as the updates pertaining to that table.
212
+ /// Holds the updates pertaining to a table on one side of the join.
214
213
struct JoinSide {
215
214
inserts : Vec < ProductValue > ,
216
215
deletes : Vec < ProductValue > ,
@@ -337,14 +336,19 @@ impl IncrementalJoin {
337
336
let mut rhs_inserts = Vec :: new ( ) ;
338
337
let mut rhs_deletes = Vec :: new ( ) ;
339
338
340
- // Partitions deletes of `update ` into `ds ` and inserts into `is `.
341
- let partition_into = |ds : & mut Vec < _ > , is : & mut Vec < _ > , updates : & DatabaseTableUpdate | {
339
+ // Partitions `updates ` into `deletes ` and `inserts `.
340
+ let partition_into = |deletes : & mut Vec < _ > , inserts : & mut Vec < _ > , updates : & DatabaseTableUpdate | {
342
341
for update in & updates. ops {
343
- if update. op_type == 0 { & mut * ds } else { & mut * is } . push ( update. row . clone ( ) ) ;
342
+ if update. op_type == 0 {
343
+ & mut * deletes
344
+ } else {
345
+ & mut * inserts
346
+ }
347
+ . push ( update. row . clone ( ) ) ;
344
348
}
345
349
} ;
346
350
347
- // Partitions all updates into the `l/rhs_insert/delete_ops ` above.
351
+ // Partitions all updates into the `(l|r)hs_(insert|delete)_ops ` above.
348
352
for update in updates {
349
353
if update. table_id == self . lhs . table_id {
350
354
partition_into ( & mut lhs_deletes, & mut lhs_inserts, update) ;
0 commit comments