@@ -1247,7 +1247,9 @@ def test_coalesce(df):
12471247 pa .array ([4 , None , 6 ]), # integer column with null
12481248 pa .array (["hello " , None , " !" ]), # string column with null
12491249 pa .array (
1250- [datetime (2022 , 12 , 31 , tzinfo = DEFAULT_TZ ), None , datetime (2020 , 7 , 2 , tzinfo = DEFAULT_TZ )]
1250+ [datetime (2022 , 12 , 31 , tzinfo = DEFAULT_TZ ),
1251+ None ,
1252+ datetime (2020 , 7 , 2 , tzinfo = DEFAULT_TZ )]
12511253 ), # datetime with null
12521254 pa .array ([False , None , True ]), # boolean column with null
12531255 ],
@@ -1260,8 +1262,9 @@ def test_coalesce(df):
12601262 f .coalesce (column ("a" ), literal ("default" )).alias ("a_coalesced" ),
12611263 f .coalesce (column ("b" ), literal (0 )).alias ("b_coalesced" ),
12621264 f .coalesce (column ("c" ), literal ("default" )).alias ("c_coalesced" ),
1263- f .coalesce (column ("d" ), literal (datetime (2000 , 1 , 1 , tzinfo = DEFAULT_TZ ))).alias ("d_coalesced" ),
1264- f .coalesce (column ("e" ), literal (False )).alias ("e_coalesced" ),
1265+ f .coalesce (column ("d" ), literal (datetime (2000 , 1 , 1 ,
1266+ tzinfo = DEFAULT_TZ ))).alias ("d_coalesced" ),
1267+ f .coalesce (column ("e" ), literal (value = False )).alias ("e_coalesced" ),
12651268 )
12661269
12671270 result = result_df .collect ()[0 ]
@@ -1275,8 +1278,8 @@ def test_coalesce(df):
12751278 ["hello " , "default" , " !" ], type = pa .string_view ()
12761279 )
12771280 assert result .column (3 ).to_pylist () == [
1278- datetime (2022 , 12 , 31 , tzinfo = DEFAULT_TZ ),
1279- datetime (2000 , 1 , 1 , tzinfo = DEFAULT_TZ ),
1281+ datetime (2022 , 12 , 31 , tzinfo = DEFAULT_TZ ),
1282+ datetime (2000 , 1 , 1 , tzinfo = DEFAULT_TZ ),
12801283 datetime (2020 , 7 , 2 , tzinfo = DEFAULT_TZ )]
12811284 assert result .column (4 ) == pa .array ([False , False , True ], type = pa .bool_ ())
12821285
0 commit comments