Skip to content

Commit

Permalink
Merge pull request #719 from bealdav/patch-1
Browse files Browse the repository at this point in the history
update connectorx-python: avoid diving into the exception for recent …
  • Loading branch information
wangxiaoying authored Jan 13, 2025
2 parents 053a59e + 8120208 commit ec9a929
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions connectorx-python/connectorx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ec9a929

Please sign in to comment.