diff --git a/crates/azure/src/lib.rs b/crates/azure/src/lib.rs index 16f40cfa24..079fd442c8 100644 --- a/crates/azure/src/lib.rs +++ b/crates/azure/src/lib.rs @@ -47,7 +47,7 @@ impl ObjectStoreFactory for AzureFactory { let config = config::AzureConfigHelper::try_new(options.as_azure_options())?.build()?; let (_, path) = - ObjectStoreScheme::parse(&url).map_err(|e| DeltaTableError::GenericError { + ObjectStoreScheme::parse(url).map_err(|e| DeltaTableError::GenericError { source: Box::new(e), })?; let prefix = Path::parse(path)?; @@ -55,11 +55,11 @@ impl ObjectStoreFactory for AzureFactory { let mut builder = MicrosoftAzureBuilder::new().with_url(url.to_string()); for (key, value) in config.iter() { - builder = builder.with_config(key.clone(), value.clone()); + builder = builder.with_config(*key, value.clone()); } let inner = builder - .with_retry(self.parse_retry_config(&options)?) + .with_retry(self.parse_retry_config(options)?) .build()?; let store = limit_store_handler(url_prefix_handler(inner, prefix.clone()), options); diff --git a/crates/catalog-unity/src/lib.rs b/crates/catalog-unity/src/lib.rs index 816376eba8..ff2ed2eaef 100644 --- a/crates/catalog-unity/src/lib.rs +++ b/crates/catalog-unity/src/lib.rs @@ -75,11 +75,9 @@ pub enum UnityCatalogError { impl From for DataCatalogError { fn from(value: UnityCatalogError) -> Self { - match value { - _ => DataCatalogError::Generic { - catalog: "Unity", - source: Box::new(value), - }, + DataCatalogError::Generic { + catalog: "Unity", + source: Box::new(value), } } } diff --git a/crates/core/src/operations/add_column.rs b/crates/core/src/operations/add_column.rs index 9da5b86111..d312668f6c 100644 --- a/crates/core/src/operations/add_column.rs +++ b/crates/core/src/operations/add_column.rs @@ -6,7 +6,7 @@ use delta_kernel::schema::StructType; use futures::future::BoxFuture; use itertools::Itertools; -use super::transaction::{CommitBuilder, CommitProperties, PROTOCOL}; +use super::transaction::{CommitBuilder, CommitProperties}; use super::{CustomExecuteHandler, Operation}; use crate::kernel::{StructField, StructTypeExt}; use crate::logstore::LogStoreRef; diff --git a/crates/core/src/operations/merge/mod.rs b/crates/core/src/operations/merge/mod.rs index 972d6b4291..b665daf0d9 100644 --- a/crates/core/src/operations/merge/mod.rs +++ b/crates/core/src/operations/merge/mod.rs @@ -779,7 +779,7 @@ async fn execute( if df .clone() .schema() - .field_with_unqualified_name(&col_name.to_string()) + .field_with_unqualified_name(col_name) .is_err() // implies it doesn't exist { diff --git a/crates/core/src/storage/mod.rs b/crates/core/src/storage/mod.rs index a51d72b068..499a6c9609 100644 --- a/crates/core/src/storage/mod.rs +++ b/crates/core/src/storage/mod.rs @@ -356,13 +356,13 @@ pub trait RetryConfigParse { } if let Some(retry_timeout) = options.0.get("retry_timeout") { - retry_config.retry_timeout = parse_duration(&retry_timeout).map_err(|_| { + retry_config.retry_timeout = parse_duration(retry_timeout).map_err(|_| { DeltaTableError::generic(format!("failed to parse \"{retry_timeout}\" as Duration")) })?; } if let Some(bc_init_backoff) = options.0.get("backoff_config.init_backoff") { - retry_config.backoff.init_backoff = parse_duration(&bc_init_backoff).map_err(|_| { + retry_config.backoff.init_backoff = parse_duration(bc_init_backoff).map_err(|_| { DeltaTableError::generic(format!( "failed to parse \"{bc_init_backoff}\" as Duration" )) @@ -370,7 +370,7 @@ pub trait RetryConfigParse { } if let Some(bc_max_backoff) = options.0.get("backoff_config.max_backoff") { - retry_config.backoff.max_backoff = parse_duration(&bc_max_backoff).map_err(|_| { + retry_config.backoff.max_backoff = parse_duration(bc_max_backoff).map_err(|_| { DeltaTableError::generic(format!( "failed to parse \"{bc_max_backoff}\" as Duration" )) @@ -668,6 +668,6 @@ mod tests { assert_eq!(retry_config.retry_timeout, Duration::from_secs(300)); assert_eq!(retry_config.backoff.init_backoff, Duration::from_secs(20)); assert_eq!(retry_config.backoff.max_backoff, Duration::from_secs(3600)); - assert_eq!(retry_config.backoff.base, 50 as f64); + assert_eq!(retry_config.backoff.base, 50_f64); } } diff --git a/crates/gcp/src/lib.rs b/crates/gcp/src/lib.rs index 3bcf9b3f26..d18a539591 100644 --- a/crates/gcp/src/lib.rs +++ b/crates/gcp/src/lib.rs @@ -48,7 +48,7 @@ impl ObjectStoreFactory for GcpFactory { let config = config::GcpConfigHelper::try_new(options.as_gcp_options())?.build()?; let (_, path) = - ObjectStoreScheme::parse(&url).map_err(|e| DeltaTableError::GenericError { + ObjectStoreScheme::parse(url).map_err(|e| DeltaTableError::GenericError { source: Box::new(e), })?; let prefix = Path::parse(path)?; @@ -56,11 +56,11 @@ impl ObjectStoreFactory for GcpFactory { let mut builder = GoogleCloudStorageBuilder::new().with_url(url.to_string()); for (key, value) in config.iter() { - builder = builder.with_config(key.clone(), value.clone()); + builder = builder.with_config(*key, value.clone()); } let inner = builder - .with_retry(self.parse_retry_config(&options)?) + .with_retry(self.parse_retry_config(options)?) .build()?; let gcs_backend = crate::storage::GcsStorageBackend::try_new(Arc::new(inner))?; diff --git a/crates/lakefs/src/storage.rs b/crates/lakefs/src/storage.rs index 6aafdd72f1..d5f77eec15 100644 --- a/crates/lakefs/src/storage.rs +++ b/crates/lakefs/src/storage.rs @@ -101,7 +101,7 @@ impl ObjectStoreFactory for LakeFSObjectStoreFactory { let mut builder = AmazonS3Builder::new().with_url(s3_url.to_string()); for (key, value) in config.iter() { - builder = builder.with_config(key.clone(), value.clone()); + builder = builder.with_config(*key, value.clone()); } let inner = builder diff --git a/python/pyproject.toml b/python/pyproject.toml index f02c5ebbe1..b7dd918fe6 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] -dependencies = ["pyarrow>=16"] +dependencies = ["pyarrow>=16,<19"] dynamic = ["version"] [project.optional-dependencies] diff --git a/python/src/error.rs b/python/src/error.rs index 0fbd7ffb12..12b41b4c5c 100644 --- a/python/src/error.rs +++ b/python/src/error.rs @@ -101,9 +101,9 @@ pub enum PythonError { ThreadingError(String), } -impl Into for std::sync::PoisonError { - fn into(self) -> PythonError { - PythonError::ThreadingError(self.to_string()) +impl From> for PythonError { + fn from(val: std::sync::PoisonError) -> Self { + PythonError::ThreadingError(val.to_string()) } } diff --git a/python/src/lib.rs b/python/src/lib.rs index 015b5bd176..24ab95d80d 100644 --- a/python/src/lib.rs +++ b/python/src/lib.rs @@ -153,7 +153,7 @@ impl RawDeltaTable { ._table .lock() .map_err(|e| PyRuntimeError::new_err(e.to_string()))?; - (*original).state = state; + original.state = state; Ok(()) } }