1212
1313from duckdb .polars_io import _pl_tree_to_sql , _predicate_to_expression # noqa: E402
1414
15+ pl_pre_1_35_0 = parse_version (pl .__version__ ) < parse_version ("1.35.0" )
1516pl_pre_1_36_0 = parse_version (pl .__version__ ) < parse_version ("1.36.0" )
1617
1718
@@ -437,7 +438,7 @@ def test_polars_lazy_pushdown_timestamp(self, duckdb_cursor):
437438 lazy_df .filter ((pl .col ("a" ) == ts_2020 ) | (pl .col ("b" ) == ts_2008 )).select (pl .len ()).collect ().item () == 2
438439 )
439440
440- @pytest .mark .skipif (pl_pre_1_36_0 , reason = "Polars < 1.36.0 expressions on dates produce casts in predicates" )
441+ @pytest .mark .skipif (pl_pre_1_35_0 , reason = "Polars < 1.36.0 expressions on dates produce casts in predicates" )
441442 def test_polars_predicate_to_expression_post_1_36_0 (self ):
442443 ts_2008 = datetime .datetime (2008 , 1 , 1 , 0 , 0 , 1 )
443444 ts_2010 = datetime .datetime (2010 , 1 , 1 , 10 , 0 , 1 )
@@ -454,7 +455,7 @@ def test_polars_predicate_to_expression_post_1_36_0(self):
454455 valid_filter ((pl .col ("a" ) == ts_2020 ) & (pl .col ("b" ) == ts_2010 ) & (pl .col ("c" ) == ts_2020 ))
455456 valid_filter ((pl .col ("a" ) == ts_2020 ) | (pl .col ("b" ) == ts_2008 ))
456457
457- @pytest .mark .skipif (not pl_pre_1_36_0 , reason = "Polars >= 1.36.0 expressions on dates don't produce casts" )
458+ @pytest .mark .skipif (not pl_pre_1_35_0 , reason = "Polars >= 1.36.0 expressions on dates don't produce casts" )
458459 def test_polars_predicate_to_expression_pre_1_36_0 (self ):
459460 ts_2008 = datetime .datetime (2008 , 1 , 1 , 0 , 0 , 1 )
460461 ts_2010 = datetime .datetime (2010 , 1 , 1 , 10 , 0 , 1 )
0 commit comments