diff --git a/python/deltalake/table.py b/python/deltalake/table.py index 3549bdc048..b93c27f6cb 100644 --- a/python/deltalake/table.py +++ b/python/deltalake/table.py @@ -444,7 +444,7 @@ def __stringify_partition_values( out.append((field, op, str_value)) return out - def get_add_actions_df(self, flatten: bool = False) -> pyarrow.RecordBatch: + def get_add_actions(self, flatten: bool = False) -> pyarrow.RecordBatch: """ Return a dataframe with all current add actions. @@ -476,4 +476,4 @@ def get_add_actions_df(self, flatten: bool = False) -> pyarrow.RecordBatch: 1 x=3/0-91820cbf-f698-45fb-886d-5d5f5669530b-0.p... 565 1970-01-20 08:40:08.071 True 3 1 0 6 6 2 x=1/0-91820cbf-f698-45fb-886d-5d5f5669530b-0.p... 565 1970-01-20 08:40:08.071 True 1 1 0 4 4 """ - return self._table.get_add_actions_df(flatten) + return self._table.get_add_actions(flatten) diff --git a/python/src/lib.rs b/python/src/lib.rs index 6e41a5157d..6fc786be05 100644 --- a/python/src/lib.rs +++ b/python/src/lib.rs @@ -454,7 +454,7 @@ impl RawDeltaTable { Ok(()) } - pub fn get_add_actions_df(&self) -> PyResult> { + pub fn get_add_actions(&self, flatten: bool) -> PyResult> { Ok(PyArrowType( self._table .get_state() diff --git a/python/tests/test_table_read.py b/python/tests/test_table_read.py index 277bd84d39..164a32c008 100644 --- a/python/tests/test_table_read.py +++ b/python/tests/test_table_read.py @@ -273,7 +273,7 @@ def test_history_partitioned_table_metadata(): def test_add_actions_table(flatten: bool): table_path = "../rust/tests/data/delta-0.8.0-partitioned" dt = DeltaTable(table_path) - actions_df = dt.get_add_actions_df(flatten) + actions_df = dt.get_add_actions(flatten) # RecordBatch doesn't have a sort_by method yet actions_df = pa.Table.from_batches([actions_df]).sort_by("path").to_batches()[0] diff --git a/rust/src/table_state.rs b/rust/src/table_state.rs index 23f7812395..9c8a3da089 100644 --- a/rust/src/table_state.rs +++ b/rust/src/table_state.rs @@ -379,6 +379,8 @@ impl DeltaTableState { Ok(actions) } } + +#[cfg(test)] mod tests { use super::*; use pretty_assertions::assert_eq;