Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco committed Aug 4, 2024
1 parent 84b3272 commit c743970
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
13 changes: 6 additions & 7 deletions python/deltalake/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,6 @@ class TableAlterer:
def __init__(self, table: DeltaTable) -> None:
self.table = table


def add_feature(
self,
feature: TableFeatures,
Expand Down Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,19 +560,19 @@ impl RawDeltaTable {
)
.with_feature(Into::<KernelTableFeatures>::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,
Expand All @@ -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;
Expand Down

0 comments on commit c743970

Please sign in to comment.