diff --git a/connectorx-python/connectorx/__init__.py b/connectorx-python/connectorx/__init__.py index b4240b1be..374becd78 100644 --- a/connectorx-python/connectorx/__init__.py +++ b/connectorx-python/connectorx/__init__.py @@ -397,10 +397,10 @@ def read_sql( if return_type in {"polars", "polars2"}: pl = try_import_module("polars") try: - df = pl.DataFrame.from_arrow(df) - except AttributeError: - # api change for polars >= 0.8.* df = pl.from_arrow(df) + except AttributeError: + # previous polars api (< 0.8.*) was pl.DataFrame.from_arrow + df = pl.DataFrame.from_arrow(df) else: raise ValueError(return_type)