@@ -1247,7 +1247,7 @@ 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 ), None , datetime (2020 , 7 , 2 )]
1250+ [datetime (2022 , 12 , 31 , tzinfo = DEFAULT_TZ ), None , datetime (2020 , 7 , 2 , tzinfo = DEFAULT_TZ )]
12511251 ), # datetime with null
12521252 pa .array ([False , None , True ]), # boolean column with null
12531253 ],
@@ -1260,7 +1260,7 @@ def test_coalesce(df):
12601260 f .coalesce (column ("a" ), literal ("default" )).alias ("a_coalesced" ),
12611261 f .coalesce (column ("b" ), literal (0 )).alias ("b_coalesced" ),
12621262 f .coalesce (column ("c" ), literal ("default" )).alias ("c_coalesced" ),
1263- f .coalesce (column ("d" ), literal (datetime (2000 , 1 , 1 ))).alias ("d_coalesced" ),
1263+ f .coalesce (column ("d" ), literal (datetime (2000 , 1 , 1 , tzinfo = DEFAULT_TZ ))).alias ("d_coalesced" ),
12641264 f .coalesce (column ("e" ), literal (False )).alias ("e_coalesced" ),
12651265 )
12661266
@@ -1274,10 +1274,10 @@ def test_coalesce(df):
12741274 assert result .column (2 ) == pa .array (
12751275 ["hello " , "default" , " !" ], type = pa .string_view ()
12761276 )
1277- assert result .column (3 ) == pa . array (
1278- [ datetime (2022 , 12 , 31 ), datetime ( 2000 , 1 , 1 ), datetime ( 2020 , 7 , 2 )],
1279- type = pa . timestamp ( "us" ),
1280- )
1277+ assert result .column (3 ). to_pylist () == [
1278+ datetime (2022 , 12 , 31 , tzinfo = DEFAULT_TZ ),
1279+ datetime ( 2000 , 1 , 1 , tzinfo = DEFAULT_TZ ),
1280+ datetime ( 2020 , 7 , 2 , tzinfo = DEFAULT_TZ )]
12811281 assert result .column (4 ) == pa .array ([False , False , True ], type = pa .bool_ ())
12821282
12831283 # Test multiple arguments
0 commit comments