diff --git a/ibis/formats/polars.py b/ibis/formats/polars.py index 20cc8998d4a4..b49ceb7e6797 100644 --- a/ibis/formats/polars.py +++ b/ibis/formats/polars.py @@ -66,7 +66,7 @@ def to_ibis(cls, typ: pl.DataType, nullable=True) -> dt.DataType: except AttributeError: # pragma: no cover time_unit = typ.tu # pragma: no cover return dt.Interval(unit=time_unit, nullable=nullable) - elif base_type is pl.List: + elif base_type is pl.List or base_type is pl.Array: return dt.Array(cls.to_ibis(typ.inner), nullable=nullable) elif base_type is pl.Struct: return dt.Struct.from_tuples( diff --git a/ibis/formats/tests/test_polars.py b/ibis/formats/tests/test_polars.py index 201e42db1ad0..d641dd096c05 100644 --- a/ibis/formats/tests/test_polars.py +++ b/ibis/formats/tests/test_polars.py @@ -171,3 +171,7 @@ def test_convert_table(): ) assert df.equals(sol) assert df.schema == sol.schema + + +def test_array_type(): + assert PolarsType.to_ibis(pl.Array(pl.Int64, 2)) == dt.Array(dt.int64)