@@ -649,7 +649,7 @@ def test_handle_execute_response_sets_compression_in_direct_results(
649649 ssl_options = SSLOptions (),
650650 )
651651
652- execute_response , _ = thrift_backend ._handle_execute_response (
652+ execute_response , _ , _ = thrift_backend ._handle_execute_response (
653653 t_execute_resp , Mock ()
654654 )
655655 self .assertEqual (execute_response .lz4_compressed , lz4Compressed )
@@ -892,6 +892,7 @@ def test_handle_execute_response_can_handle_without_direct_results(
892892 (
893893 execute_response ,
894894 _ ,
895+ _ ,
895896 ) = thrift_backend ._handle_execute_response (execute_resp , Mock ())
896897 self .assertEqual (
897898 execute_response .status ,
@@ -927,7 +928,7 @@ def test_handle_execute_response_can_handle_with_direct_results(self):
927928 auth_provider = AuthProvider (),
928929 ssl_options = SSLOptions (),
929930 )
930- thrift_backend ._results_message_to_execute_response = Mock ()
931+ thrift_backend ._results_message_to_execute_response = Mock (return_value = ( Mock (), Mock ()) )
931932
932933 thrift_backend ._handle_execute_response (execute_resp , Mock ())
933934
@@ -965,7 +966,7 @@ def test_use_arrow_schema_if_available(self, tcli_service_class):
965966 )
966967 )
967968 thrift_backend = self ._make_fake_thrift_backend ()
968- execute_response , _ = thrift_backend ._handle_execute_response (
969+ execute_response , _ , _ = thrift_backend ._handle_execute_response (
969970 t_execute_resp , Mock ()
970971 )
971972
@@ -997,7 +998,7 @@ def test_fall_back_to_hive_schema_if_no_arrow_schema(self, tcli_service_class):
997998 )
998999 )
9991000 thrift_backend = self ._make_fake_thrift_backend ()
1000- _ , _ = thrift_backend ._handle_execute_response (t_execute_resp , Mock ())
1001+ _ , _ , _ = thrift_backend ._handle_execute_response (t_execute_resp , Mock ())
10011002
10021003 self .assertEqual (
10031004 hive_schema_mock ,
@@ -1046,6 +1047,7 @@ def test_handle_execute_response_reads_has_more_rows_in_direct_results(
10461047 (
10471048 execute_response ,
10481049 has_more_rows_result ,
1050+ _
10491051 ) = thrift_backend ._handle_execute_response (execute_resp , Mock ())
10501052
10511053 self .assertEqual (is_direct_results , has_more_rows_result )
@@ -1179,7 +1181,7 @@ def test_execute_statement_calls_client_and_handle_execute_response(
11791181 ssl_options = SSLOptions (),
11801182 )
11811183 thrift_backend ._handle_execute_response = Mock ()
1182- thrift_backend ._handle_execute_response .return_value = (Mock (), Mock ())
1184+ thrift_backend ._handle_execute_response .return_value = (Mock (), Mock (), Mock () )
11831185 cursor_mock = Mock ()
11841186
11851187 result = thrift_backend .execute_command (
@@ -1215,7 +1217,7 @@ def test_get_catalogs_calls_client_and_handle_execute_response(
12151217 ssl_options = SSLOptions (),
12161218 )
12171219 thrift_backend ._handle_execute_response = Mock ()
1218- thrift_backend ._handle_execute_response .return_value = (Mock (), Mock ())
1220+ thrift_backend ._handle_execute_response .return_value = (Mock (), Mock (), Mock () )
12191221 cursor_mock = Mock ()
12201222
12211223 result = thrift_backend .get_catalogs (Mock (), 100 , 200 , cursor_mock )
@@ -1248,7 +1250,7 @@ def test_get_schemas_calls_client_and_handle_execute_response(
12481250 ssl_options = SSLOptions (),
12491251 )
12501252 thrift_backend ._handle_execute_response = Mock ()
1251- thrift_backend ._handle_execute_response .return_value = (Mock (), Mock ())
1253+ thrift_backend ._handle_execute_response .return_value = (Mock (), Mock (), Mock () )
12521254 cursor_mock = Mock ()
12531255
12541256 result = thrift_backend .get_schemas (
@@ -1290,7 +1292,7 @@ def test_get_tables_calls_client_and_handle_execute_response(
12901292 ssl_options = SSLOptions (),
12911293 )
12921294 thrift_backend ._handle_execute_response = Mock ()
1293- thrift_backend ._handle_execute_response .return_value = (Mock (), Mock ())
1295+ thrift_backend ._handle_execute_response .return_value = (Mock (), Mock (), Mock () )
12941296 cursor_mock = Mock ()
12951297
12961298 result = thrift_backend .get_tables (
@@ -1336,7 +1338,7 @@ def test_get_columns_calls_client_and_handle_execute_response(
13361338 ssl_options = SSLOptions (),
13371339 )
13381340 thrift_backend ._handle_execute_response = Mock ()
1339- thrift_backend ._handle_execute_response .return_value = (Mock (), Mock ())
1341+ thrift_backend ._handle_execute_response .return_value = (Mock (), Mock (), Mock () )
13401342 cursor_mock = Mock ()
13411343
13421344 result = thrift_backend .get_columns (
@@ -1682,7 +1684,7 @@ def test_handle_execute_response_sets_active_op_handle(self):
16821684 thrift_backend = self ._make_fake_thrift_backend ()
16831685 thrift_backend ._check_direct_results_for_error = Mock ()
16841686 thrift_backend ._wait_until_command_done = Mock ()
1685- thrift_backend ._results_message_to_execute_response = Mock ()
1687+ thrift_backend ._results_message_to_execute_response = Mock (return_value = ( Mock (), Mock ()) )
16861688
16871689 # Create a mock response with a real operation handle
16881690 mock_resp = Mock ()
@@ -2254,6 +2256,7 @@ def test_execute_command_sets_complex_type_fields_correctly(
22542256 mock_handle_execute_response .return_value = (
22552257 mock_execute_response ,
22562258 mock_arrow_schema ,
2259+ Mock ()
22572260 )
22582261
22592262 # Iterate through each possible combination of native types (True, False and unset)
0 commit comments