@@ -162,11 +162,6 @@ def from_polars(cls, polars_schema):
162162
163163 return PolarsSchema .to_ibis (polars_schema )
164164
165- @classmethod
166- def from_dask (cls , dask_schema ):
167- """Return the equivalent ibis schema."""
168- return cls .from_pandas (dask_schema )
169-
170165 def to_numpy (self ):
171166 """Return the equivalent numpy dtypes."""
172167 from ibis .formats .numpy import NumpySchema
@@ -191,10 +186,6 @@ def to_polars(self):
191186
192187 return PolarsSchema .from_ibis (self )
193188
194- def to_dask (self ):
195- """Return the equivalent dask dtypes."""
196- return self .to_pandas ()
197-
198189 def as_struct (self ) -> dt .Struct :
199190 return dt .Struct (self )
200191
@@ -238,7 +229,7 @@ def schema(value: Any) -> Schema:
238229
239230
240231@lazy_singledispatch
241- def infer (value : Any , schema = None ) -> Schema :
232+ def infer (value : Any ) -> Schema :
242233 """Infer the corresponding ibis schema for a python object."""
243234 raise InputTypeError (value )
244235
@@ -278,28 +269,25 @@ def from_pyarrow_schema(schema):
278269
279270
280271@infer .register ("pandas.DataFrame" )
281- def infer_pandas_dataframe (df , schema = None ):
272+ def infer_pandas_dataframe (df ):
282273 from ibis .formats .pandas import PandasData
283274
284- return PandasData .infer_table (df , schema )
275+ return PandasData .infer_table (df )
285276
286277
287- # TODO(kszucs): do we really need the schema kwarg?
288278@infer .register ("pyarrow.Table" )
289- def infer_pyarrow_table (table , schema = None ):
279+ def infer_pyarrow_table (table ):
290280 from ibis .formats .pyarrow import PyArrowSchema
291281
292- schema = schema if schema is not None else table .schema
293- return PyArrowSchema .to_ibis (schema )
282+ return PyArrowSchema .to_ibis (table .schema )
294283
295284
296285@infer .register ("polars.DataFrame" )
297286@infer .register ("polars.LazyFrame" )
298- def infer_polars_dataframe (df , schema = None ):
287+ def infer_polars_dataframe (df ):
299288 from ibis .formats .polars import PolarsSchema
300289
301- schema = schema if schema is not None else df .schema
302- return PolarsSchema .to_ibis (schema )
290+ return PolarsSchema .to_ibis (df .schema )
303291
304292
305293# lock the dispatchers to avoid adding new implementations
0 commit comments