2424 no_arrow_iterator_ext = True
2525
2626SQL_ENABLE_ARROW = "alter session set query_result_format='ARROW_FORCE';"
27+ SQL_ENABLE_ARROW_V2 = "alter session set python_connector_query_result_format='ARROW_FORCE';"
2728
2829EPSILON = 1e-8
2930
@@ -229,6 +230,7 @@ def test_semi_struct(conn_cnx):
229230 # fetch dataframe with new arrow support
230231 cursor_table = cnx_table .cursor ()
231232 cursor_table .execute (SQL_ENABLE_ARROW )
233+ cursor_table .execute (SQL_ENABLE_ARROW_V2 )
232234 cursor_table .execute (sql_text )
233235 df_new = cursor_table .fetch_pandas_all ()
234236 col_new = df_new .iloc [0 ]
@@ -430,6 +432,7 @@ def validate_pandas(conn_cnx, sql, cases, col_count, method='one', data_type='fl
430432 # fetch dataframe with new arrow support
431433 cursor_table = cnx_table .cursor ()
432434 cursor_table .execute (SQL_ENABLE_ARROW )
435+ cursor_table .execute (SQL_ENABLE_ARROW_V2 )
433436 cursor_table .execute (sql )
434437
435438 # build dataframe
@@ -524,6 +527,7 @@ def test_empty(conn_cnx):
524527 with conn_cnx () as cnx :
525528 cursor = cnx .cursor ()
526529 cursor .execute (SQL_ENABLE_ARROW )
530+ cursor .execute (SQL_ENABLE_ARROW_V2 )
527531 cursor .execute ("select seq4() from table(generator(rowcount=>1)) limit 0" )
528532 assert cursor .fetch_pandas_all () is None , 'the result is not none'
529533
@@ -553,6 +557,7 @@ def fetch_pandas(conn_cnx, sql, row_count, col_count, method='one'):
553557 # fetch dataframe by fetching row by row
554558 cursor_row = cnx_row .cursor ()
555559 cursor_row .execute (SQL_ENABLE_ARROW )
560+ cursor_row .execute (SQL_ENABLE_ARROW_V2 )
556561 cursor_row .execute (sql )
557562
558563 # build dataframe
@@ -578,6 +583,7 @@ def fetch_pandas(conn_cnx, sql, row_count, col_count, method='one'):
578583 # fetch dataframe with new arrow support
579584 cursor_table = cnx_table .cursor ()
580585 cursor_table .execute (SQL_ENABLE_ARROW )
586+ cursor_table .execute (SQL_ENABLE_ARROW_V2 )
581587 cursor_table .execute (sql )
582588
583589 # build dataframe
0 commit comments