Skip to content

Commit 47ef3b5

Browse files
pauldouanePaul Douane
andauthored
fix: make session the first argument of update_datafusion_session (delta-io#4192)
# Description `update_datafusion_session` currently updates the state of the Session while receiving it as the second argument. This change reorders the function parameters so that the Session is passed as the first argument, matching the intent discussed in the issue. # Related Issue(s) - closes delta-io#4139 # Documentation --------- Signed-off-by: Paul Douane <paul.douane@icloud.com> Co-authored-by: Paul Douane <paul.douane@icloud.com>
1 parent 34516c8 commit 47ef3b5

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

crates/core/src/delta_datafusion/table_provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,8 @@ impl DeltaTable {
754754
}
755755

756756
pub(crate) fn update_datafusion_session(
757-
log_store: &dyn LogStore,
758757
session: &dyn Session,
758+
log_store: &dyn LogStore,
759759
operation_id: Option<Uuid>,
760760
) -> DeltaResult<()> {
761761
crate::delta_datafusion::DeltaSessionExt::ensure_object_store_registered(

crates/core/src/delta_datafusion/table_provider/next/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ impl TableProvider for DeltaScan {
453453
)
454454
})?;
455455

456-
super::update_datafusion_session(log_store.as_ref(), state, None)?;
456+
super::update_datafusion_session(state, log_store.as_ref(), None)?;
457457

458458
let snapshot = match &self.snapshot {
459459
SnapshotWrapper::EagerSnapshot(esnap) => esnap.as_ref().clone(),

crates/core/src/operations/delete.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl std::future::IntoFuture for DeleteBuilder {
226226
cdc: false,
227227
},
228228
)?;
229-
update_datafusion_session(&this.log_store, &session, Some(operation_id))?;
229+
update_datafusion_session(&session, &this.log_store, Some(operation_id))?;
230230
session.ensure_log_store_registered(this.log_store.as_ref())?;
231231

232232
let predicate = this

crates/core/src/operations/update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ impl std::future::IntoFuture for UpdateBuilder {
460460
cdc: false,
461461
},
462462
)?;
463-
update_datafusion_session(&this.log_store, &state, Some(operation_id))?;
463+
update_datafusion_session(&state, &this.log_store, Some(operation_id))?;
464464
state.ensure_log_store_registered(this.log_store.as_ref())?;
465465

466466
if this.updates.is_empty() {

crates/core/src/operations/write/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ impl std::future::IntoFuture for WriteBuilder {
477477
},
478478
)?;
479479

480-
update_datafusion_session(&this.log_store, &session, Some(operation_id))?;
480+
update_datafusion_session(&session, &this.log_store, Some(operation_id))?;
481481
session.ensure_log_store_registered(this.log_store.as_ref())?;
482482

483483
let mut schema_drift = false;

0 commit comments

Comments
 (0)