@@ -982,7 +982,25 @@ def test_execute_async_and_fetch_pandas_batches(conn_cnx):
982982                assert  r_sync .values  ==  r_async .values 
983983
984984
985- def  test_simple_async_arrow (conn_cnx ):
985+ def  test_execute_async_and_fetch_arrow_batches (conn_cnx ):
986+     """Test fetching result of an asynchronous query as batches of arrow tables""" 
987+ 
988+     with  conn_cnx () as  cnx :
989+         with  cnx .cursor () as  cur :
990+             cur .execute ("select 1/2" )
991+             res_sync  =  cur .fetch_arrow_batches ()
992+ 
993+             result  =  cur .execute_async ("select 1/2" )
994+             cur .get_results_from_sfqid (result ["queryId" ])
995+             res_async  =  cur .fetch_arrow_batches ()
996+ 
997+             assert  res_sync  is  not   None 
998+             assert  res_async  is  not   None 
999+             for  r_sync , r_async  in  zip (res_sync , res_async ):
1000+                 assert  r_sync  ==  r_async 
1001+ 
1002+ 
1003+ def  test_simple_async_pandas (conn_cnx ):
9861004    """Simple test to that shows the most simple usage of fire and forget. 
9871005
9881006    This test also makes sure that wait_until_ready function's sleeping is tested and 
@@ -997,6 +1015,17 @@ def test_simple_async_arrow(conn_cnx):
9971015            assert  cur .description 
9981016
9991017
1018+ def  test_simple_async_arrow (conn_cnx ):
1019+     """Simple test for async fetch_arrow_all""" 
1020+     with  conn_cnx () as  con :
1021+         with  con .cursor () as  cur :
1022+             cur .execute_async ("select count(*) from table(generator(timeLimit => 5))" )
1023+             cur .get_results_from_sfqid (cur .sfqid )
1024+             assert  len (cur .fetch_arrow_all ()) ==  1 
1025+             assert  cur .rowcount 
1026+             assert  cur .description 
1027+ 
1028+ 
10001029@pytest .mark .parametrize ( 
10011030    "use_decimal,expected" , 
10021031    [ 
0 commit comments