File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1246,9 +1246,12 @@ def _list_length_exprs(
12461246 """Collect max-list-length scalar expressions for every List level in the type
12471247 tree."""
12481248 if isinstance (dtype , pl .List ):
1249- return [expr .list .len ().max (), * _list_length_exprs (expr .explode (), dtype .inner )]
1249+ return [
1250+ expr .list .len ().max (),
1251+ * _list_length_exprs (expr .explode (empty_as_null = True ), dtype .inner ),
1252+ ]
12501253 if isinstance (dtype , pl .Array ):
1251- return _list_length_exprs (expr .explode (), dtype .inner )
1254+ return _list_length_exprs (expr .explode (empty_as_null = True ), dtype .inner )
12521255 if isinstance (dtype , pl .Struct ):
12531256 return [
12541257 e
Original file line number Diff line number Diff line change @@ -96,3 +96,8 @@ default.extend-ignore-re = [
9696addopts = " --import-mode=importlib -m 'not generate'"
9797markers = [" generate: mark a test function as generating fixture output." ]
9898testpaths = [" tests" ]
99+ filterwarnings = [
100+ " error" ,
101+ # polars' deprecation warning for horizontal concatenation cannot be solved, we are already using it correctly
102+ " ignore:the default behavior of `how='horizontal'` for `concat` is deprecated:DeprecationWarning" ,
103+ ]
Original file line number Diff line number Diff line change @@ -30,20 +30,24 @@ def test_missing_primary_key_fraction_same() -> None:
3030@pytest .mark .parametrize ("frame_type" , FRAME_TYPES )
3131@pytest .mark .parametrize (
3232 "dtypes_left" ,
33- itertools .zip_longest (
34- FLOAT_DTYPES ,
35- SIGNED_INTEGER_DTYPES ,
36- UNSIGNED_INTEGER_DTYPES ,
37- fillvalue = pl .Float32 ,
33+ list (
34+ itertools .zip_longest (
35+ FLOAT_DTYPES ,
36+ SIGNED_INTEGER_DTYPES ,
37+ UNSIGNED_INTEGER_DTYPES ,
38+ fillvalue = pl .Float32 ,
39+ )
3840 ),
3941)
4042@pytest .mark .parametrize (
4143 "dtypes_right" ,
42- itertools .zip_longest (
43- FLOAT_DTYPES ,
44- SIGNED_INTEGER_DTYPES ,
45- UNSIGNED_INTEGER_DTYPES ,
46- fillvalue = pl .Float32 ,
44+ list (
45+ itertools .zip_longest (
46+ FLOAT_DTYPES ,
47+ SIGNED_INTEGER_DTYPES ,
48+ UNSIGNED_INTEGER_DTYPES ,
49+ fillvalue = pl .Float32 ,
50+ )
4751 ),
4852)
4953@pytest .mark .parametrize ("parallel" , [True , False ])
You can’t perform that action at this time.
0 commit comments