File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -723,8 +723,8 @@ def _max_list_lengths_by_column(self) -> dict[str, int]:
723723 if not (col_left and col_right ):
724724 continue
725725 columns .append (col )
726- left_exprs .append (_max_or_zero (col_left ).alias (col ))
727- right_exprs .append (_max_or_zero (col_right ).alias (col ))
726+ left_exprs .append (pl . max_horizontal (col_left ).alias (col ))
727+ right_exprs .append (pl . max_horizontal (col_right ).alias (col ))
728728
729729 if not columns :
730730 return {}
@@ -859,12 +859,3 @@ def _list_length_exprs(
859859 for e in _list_length_exprs (expr .struct [field .name ], field .dtype )
860860 ]
861861 return []
862-
863-
864- def _max_or_zero (exprs : list [pl .Expr ]) -> pl .Expr :
865- """Return the horizontal max of scalar expressions, or literal 0 if empty."""
866- if not exprs :
867- return pl .lit (0 )
868- if len (exprs ) == 1 :
869- return exprs [0 ]
870- return pl .max_horizontal (exprs )
You can’t perform that action at this time.
0 commit comments