Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
39 changes: 30 additions & 9 deletions crates/adapters/src/integrated/delta_table/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1671,16 +1671,37 @@ impl DeltaTableInputEndpointInner {
// TODO: consider processing all Add actions and all Remove actions in one
// go using `ListingTable`, which understands partitioning and can probably
// parallelize the load.

// Process deletes before inserts. Semantically, delete actions in
// are applied before insert actions; however the delta standard doesn't
// guarantee that actions occur in any particular order in the transaction log
// entry.
for action in actions {
self.process_action(
action,
table,
&column_names,
input_stream,
receiver,
start_transaction.clone(),
)
.await;
if matches!(action, Action::Remove(_)) {
self.process_action(
action,
table,
&column_names,
input_stream,
receiver,
start_transaction.clone(),
)
.await;
}
}

for action in actions {
if matches!(action, Action::Add(_)) {
Comment on lines +1693 to +1694
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actions collection is iterated twice (once for Remove, once for Add). Consider using partition or a single-pass approach with separate collections to avoid the second full iteration over all actions.

Copilot uses AI. Check for mistakes.
self.process_action(
action,
table,
&column_names,
input_stream,
receiver,
start_transaction.clone(),
)
.await;
}
}
}

Expand Down
Loading