Skip to content

Commit d5283ef

Browse files
committed
from_arrow_table and tables have been deprecated since DF42
1 parent 599ef60 commit d5283ef

2 files changed

Lines changed: 0 additions & 31 deletions

File tree

crates/core/src/context.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,21 +1007,6 @@ impl PySessionContext {
10071007
self.ctx.catalog_names().into_iter().collect()
10081008
}
10091009

1010-
pub fn tables(&self) -> HashSet<String> {
1011-
self.ctx
1012-
.catalog_names()
1013-
.into_iter()
1014-
.filter_map(|name| self.ctx.catalog(&name))
1015-
.flat_map(move |catalog| {
1016-
catalog
1017-
.schema_names()
1018-
.into_iter()
1019-
.filter_map(move |name| catalog.schema(&name))
1020-
})
1021-
.flat_map(|schema| schema.table_names())
1022-
.collect()
1023-
}
1024-
10251010
pub fn table(&self, name: &str, py: Python) -> PyResult<PyDataFrame> {
10261011
let res = wait_for_future(py, self.ctx.table(name))
10271012
.map_err(|e| PyKeyError::new_err(e.to_string()))?;

python/datafusion/context.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -775,14 +775,6 @@ def from_arrow(
775775
"""
776776
return DataFrame(self.ctx.from_arrow(data, name))
777777

778-
@deprecated("Use ``from_arrow`` instead.")
779-
def from_arrow_table(self, data: pa.Table, name: str | None = None) -> DataFrame:
780-
"""Create a :py:class:`~datafusion.dataframe.DataFrame` from an Arrow table.
781-
782-
This is an alias for :py:func:`from_arrow`.
783-
"""
784-
return self.from_arrow(data, name)
785-
786778
def from_pandas(self, data: pd.DataFrame, name: str | None = None) -> DataFrame:
787779
"""Create a :py:class:`~datafusion.dataframe.DataFrame` from a Pandas DataFrame.
788780
@@ -1117,14 +1109,6 @@ def catalog(self, name: str = "datafusion") -> Catalog:
11171109
"""Retrieve a catalog by name."""
11181110
return Catalog(self.ctx.catalog(name))
11191111

1120-
@deprecated(
1121-
"Use the catalog provider interface ``SessionContext.Catalog`` to "
1122-
"examine available catalogs, schemas and tables"
1123-
)
1124-
def tables(self) -> set[str]:
1125-
"""Deprecated."""
1126-
return self.ctx.tables()
1127-
11281112
def table(self, name: str) -> DataFrame:
11291113
"""Retrieve a previously registered table by name."""
11301114
return DataFrame(self.ctx.table(name))

0 commit comments

Comments
 (0)