File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2449,8 +2449,8 @@ def lead(
24492449 partition_by: Expressions to partition the window frame on.
24502450 order_by: Set ordering within the window frame.
24512451 """
2452- if not isinstance ( default_value , pa . Scalar ) and default_value is not None :
2453- default_value = pa .scalar ( default_value )
2452+ if default_value is not None and not hasattr ( default_value , "__arrow_c_array__" ) :
2453+ default_value = pa .array ([ default_value ] )
24542454
24552455 partition_by_raw = expr_list_to_raw_expr_list (partition_by )
24562456 order_by_raw = sort_list_to_raw_sort_list (order_by )
@@ -2499,8 +2499,8 @@ def lag(
24992499 partition_by: Expressions to partition the window frame on.
25002500 order_by: Set ordering within the window frame.
25012501 """
2502- if not isinstance (default_value , pa . Scalar ):
2503- default_value = pa .scalar ( default_value )
2502+ if default_value is not None and not hasattr (default_value , "__arrow_c_array__" ):
2503+ default_value = pa .array ([ default_value ] )
25042504
25052505 partition_by_raw = expr_list_to_raw_expr_list (partition_by )
25062506 order_by_raw = sort_list_to_raw_sort_list (order_by )
You can’t perform that action at this time.
0 commit comments