diff --git a/python/deltalake/table.py b/python/deltalake/table.py index 795c91ea81..243eafe7f3 100644 --- a/python/deltalake/table.py +++ b/python/deltalake/table.py @@ -1801,7 +1801,6 @@ class TableAlterer: def __init__(self, table: DeltaTable) -> None: self.table = table - def add_feature( self, feature: TableFeatures, @@ -1835,15 +1834,15 @@ def add_feature( feature, allow_protocol_versions_increase, custom_metadata, - post_commithook_properties.__dict__ if post_commithook_properties else None + post_commithook_properties.__dict__ if post_commithook_properties else None, ) def add_columns( - self, - fields: Union[DeltaField, List[DeltaField]], - custom_metadata: Optional[Dict[str, str]] = None, - post_commithook_properties: Optional[PostCommitHookProperties] = None, - ) -> None: + self, + fields: Union[DeltaField, List[DeltaField]], + custom_metadata: Optional[Dict[str, str]] = None, + post_commithook_properties: Optional[PostCommitHookProperties] = None, + ) -> None: """Add new columns and/or update the fields of a stuctcolumn Args: diff --git a/python/src/lib.rs b/python/src/lib.rs index 084b349613..5adac6b153 100644 --- a/python/src/lib.rs +++ b/python/src/lib.rs @@ -560,19 +560,19 @@ impl RawDeltaTable { ) .with_feature(Into::::into(feature)) .with_allow_protocol_versions_increase(allow_protocol_versions_increase); - + if let Some(commit_properties) = - maybe_create_commit_properties(custom_metadata, post_commithook_properties) - { - cmd = cmd.with_commit_properties(commit_properties); - } + maybe_create_commit_properties(custom_metadata, post_commithook_properties) + { + cmd = cmd.with_commit_properties(commit_properties); + } rt().block_on(cmd.into_future()).map_err(PythonError::from) })?; self._table.state = table.state; Ok(()) - } - + } + #[pyo3(signature = (fields, custom_metadata=None, post_commithook_properties=None))] pub fn add_columns( &mut self, @@ -599,7 +599,7 @@ impl RawDeltaTable { { cmd = cmd.with_commit_properties(commit_properties); } - + rt().block_on(cmd.into_future()).map_err(PythonError::from) })?; self._table.state = table.state;