Skip to content

Commit

Permalink
Adds import of polars selector
Browse files Browse the repository at this point in the history
In newest polars version we need to import it
so that type inference on polars spreadsheet writer/saver
can work.
  • Loading branch information
skrawcz committed Jul 29, 2024
1 parent 1a19dd2 commit 88cbc70
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hamilton/plugins/polars_post_1_0_0_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
if hasattr(pl, "type_aliases"):
has_alias = True


import polars.selectors

# for polars 1.3.0 we need to import selectors
if hasattr(polars.selectors, "_selector_proxy_"):
from polars.selectors import _selector_proxy_ # noqa

# for polars 0.18.0 we need to check what to do.
from polars._typing import CsvEncoding, SchemaDefinition

Expand Down

0 comments on commit 88cbc70

Please sign in to comment.