From b001186d27b9ae8bfee9f40a1a4be88afb9fa0e1 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Tue, 19 Mar 2024 06:02:10 -0700 Subject: [PATCH] fix: clean up some non-datafusion builds Not sure when this regressed but the lack of datafusion broke the core build error[E0432]: unresolved import `crate::delta_datafusion` --> crates/core/src/operations/transaction/conflict_checker.rs:5:12 | 5 | use crate::delta_datafusion::DataFusionMixins; | ^^^^^^^^^^^^^^^^ could not find `delta_datafusion` in the crate root error[E0700]: hidden type for `impl Iterator` captures lifetime that does not appear in bounds --> crates/core/src/operations/transaction/conflict_checker.rs:196:9 | 109 | impl<'a> TransactionInfo<'a> { | -- hidden type `impl Iterator + 'a` captures the lifetime `'a` as defined here ... 195 | pub fn read_files(&self) -> Result, CommitConflictError> { | ------------------------- opaque type defined here 196 | Ok(self.read_snapshot.file_actions().unwrap().into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some errors have detailed explanations: E0432, E0700. --- crates/core/src/operations/transaction/conflict_checker.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/core/src/operations/transaction/conflict_checker.rs b/crates/core/src/operations/transaction/conflict_checker.rs index 45da0007cb..9463a154b7 100644 --- a/crates/core/src/operations/transaction/conflict_checker.rs +++ b/crates/core/src/operations/transaction/conflict_checker.rs @@ -2,6 +2,7 @@ use std::collections::HashSet; use super::CommitInfo; +#[cfg(feature = "datafusion")] use crate::delta_datafusion::DataFusionMixins; use crate::errors::DeltaResult; use crate::kernel::EagerSnapshot; @@ -192,7 +193,7 @@ impl<'a> TransactionInfo<'a> { #[cfg(not(feature = "datafusion"))] /// Files read by the transaction - pub fn read_files(&self) -> Result, CommitConflictError> { + pub fn read_files(&self) -> Result + '_, CommitConflictError> { Ok(self.read_snapshot.file_actions().unwrap().into_iter()) }