@@ -969,13 +969,7 @@ def execute_command(
969969parameters = [],
970970async_op = False ,
971971enforce_embedded_schema_correctness = False ,
972- << << << < HEAD
973972row_limit :Optional [int ]= None ,
974- | | | | | | | 576 eafc
975- ):
976- assert session_handle is not None
977- == == == =
978- >> >> >> > main
979973 )-> Union ["ResultSet" ,None ]:
980974thrift_handle = session_id .to_thrift_handle ()
981975if not thrift_handle :
@@ -1024,17 +1018,10 @@ def execute_command(
10241018self ._handle_execute_response_async (resp ,cursor )
10251019return None
10261020else :
1027- < << << << HEAD
10281021execute_response ,is_direct_results = self ._handle_execute_response (
10291022resp ,cursor
10301023 )
1031- | | | | | | | 576 eafc
1032- return self ._handle_execute_response (resp ,cursor )
1033- == == == =
1034- execute_response = self ._handle_execute_response (resp ,cursor )
1035- >> >> >> > main
10361024
1037- < << << << HEAD
10381025t_row_set = None
10391026if resp .directResults and resp .directResults .resultSet :
10401027t_row_set = resp .directResults .resultSet .results
@@ -1058,26 +1045,6 @@ def get_catalogs(
10581045max_rows :int ,
10591046max_bytes :int ,
10601047cursor :"Cursor" ,
1061- | | | | | | | 576 eafc
1062- def get_catalogs (self ,session_handle ,max_rows ,max_bytes ,cursor ):
1063- assert session_handle is not None
1064- == == == =
1065- return ThriftResultSet (
1066- connection = cursor .connection ,
1067- execute_response = execute_response ,
1068- thrift_client = self ,
1069- buffer_size_bytes = max_bytes ,
1070- arraysize = max_rows ,
1071- use_cloud_fetch = use_cloud_fetch ,
1072- )
1073-
1074- def get_catalogs (
1075- self ,
1076- session_id :SessionId ,
1077- max_rows :int ,
1078- max_bytes :int ,
1079- cursor :Cursor ,
1080- >> >> >> > main
10811048 )-> "ResultSet" :
10821049thrift_handle = session_id .to_thrift_handle ()
10831050if not thrift_handle :
@@ -1091,7 +1058,6 @@ def get_catalogs(
10911058 )
10921059resp = self .make_request (self ._client .GetCatalogs ,req )
10931060
1094- << << << < HEAD
10951061execute_response ,is_direct_results = self ._handle_execute_response (
10961062resp ,cursor
10971063 )
@@ -1111,19 +1077,6 @@ def get_catalogs(
11111077max_download_threads = self .max_download_threads ,
11121078ssl_options = self ._ssl_options ,
11131079is_direct_results = is_direct_results ,
1114- | | | | | | | 576 eafc
1115- return self ._handle_execute_response (resp ,cursor )
1116- == == == =
1117- execute_response = self ._handle_execute_response (resp ,cursor )
1118-
1119- return ThriftResultSet (
1120- connection = cursor .connection ,
1121- execute_response = execute_response ,
1122- thrift_client = self ,
1123- buffer_size_bytes = max_bytes ,
1124- arraysize = max_rows ,
1125- use_cloud_fetch = cursor .connection .use_cloud_fetch ,
1126- >> >> >> > main
11271080 )
11281081
11291082def get_schemas (
@@ -1135,14 +1088,8 @@ def get_schemas(
11351088catalog_name = None ,
11361089schema_name = None ,
11371090 )-> "ResultSet" :
1138- << << << < HEAD
11391091from databricks .sql .result_set import ThriftResultSet
11401092
1141- | | | | | | | 576 eafc
1142- ):
1143- assert session_handle is not None
1144- == == == =
1145- >> >> >> > main
11461093thrift_handle = session_id .to_thrift_handle ()
11471094if not thrift_handle :
11481095raise ValueError ("Not a valid Thrift session ID" )
@@ -1157,7 +1104,6 @@ def get_schemas(
11571104 )
11581105resp = self .make_request (self ._client .GetSchemas ,req )
11591106
1160- << << << < HEAD
11611107execute_response ,is_direct_results = self ._handle_execute_response (
11621108resp ,cursor
11631109 )
@@ -1177,19 +1123,6 @@ def get_schemas(
11771123max_download_threads = self .max_download_threads ,
11781124ssl_options = self ._ssl_options ,
11791125is_direct_results = is_direct_results ,
1180- | | | | | | | 576 eafc
1181- return self ._handle_execute_response (resp ,cursor )
1182- == == == =
1183- execute_response = self ._handle_execute_response (resp ,cursor )
1184-
1185- return ThriftResultSet (
1186- connection = cursor .connection ,
1187- execute_response = execute_response ,
1188- thrift_client = self ,
1189- buffer_size_bytes = max_bytes ,
1190- arraysize = max_rows ,
1191- use_cloud_fetch = cursor .connection .use_cloud_fetch ,
1192- >> >> >> > main
11931126 )
11941127
11951128def get_tables (
@@ -1203,14 +1136,8 @@ def get_tables(
12031136table_name = None ,
12041137table_types = None ,
12051138 )-> "ResultSet" :
1206- << << << < HEAD
12071139from databricks .sql .result_set import ThriftResultSet
12081140
1209- | | | | | | | 576 eafc
1210- ):
1211- assert session_handle is not None
1212- == == == =
1213- >> >> >> > main
12141141thrift_handle = session_id .to_thrift_handle ()
12151142if not thrift_handle :
12161143raise ValueError ("Not a valid Thrift session ID" )
@@ -1227,7 +1154,6 @@ def get_tables(
12271154 )
12281155resp = self .make_request (self ._client .GetTables ,req )
12291156
1230- << << << < HEAD
12311157execute_response ,is_direct_results = self ._handle_execute_response (
12321158resp ,cursor
12331159 )
@@ -1247,19 +1173,6 @@ def get_tables(
12471173max_download_threads = self .max_download_threads ,
12481174ssl_options = self ._ssl_options ,
12491175is_direct_results = is_direct_results ,
1250- | | | | | | | 576 eafc
1251- return self ._handle_execute_response (resp ,cursor )
1252- == == == =
1253- execute_response = self ._handle_execute_response (resp ,cursor )
1254-
1255- return ThriftResultSet (
1256- connection = cursor .connection ,
1257- execute_response = execute_response ,
1258- thrift_client = self ,
1259- buffer_size_bytes = max_bytes ,
1260- arraysize = max_rows ,
1261- use_cloud_fetch = cursor .connection .use_cloud_fetch ,
1262- >> >> >> > main
12631176 )
12641177
12651178def get_columns (
@@ -1273,14 +1186,8 @@ def get_columns(
12731186table_name = None ,
12741187column_name = None ,
12751188 )-> "ResultSet" :
1276- << << << < HEAD
12771189from databricks .sql .result_set import ThriftResultSet
12781190
1279- | | | | | | | 576 eafc
1280- ):
1281- assert session_handle is not None
1282- == == == =
1283- >> >> >> > main
12841191thrift_handle = session_id .to_thrift_handle ()
12851192if not thrift_handle :
12861193raise ValueError ("Not a valid Thrift session ID" )
@@ -1297,7 +1204,6 @@ def get_columns(
12971204 )
12981205resp = self .make_request (self ._client .GetColumns ,req )
12991206
1300- << << << < HEAD
13011207execute_response ,is_direct_results = self ._handle_execute_response (
13021208resp ,cursor
13031209 )
@@ -1317,19 +1223,6 @@ def get_columns(
13171223max_download_threads = self .max_download_threads ,
13181224ssl_options = self ._ssl_options ,
13191225is_direct_results = is_direct_results ,
1320- | | | | | | | 576 eafc
1321- return self ._handle_execute_response (resp ,cursor )
1322- == == == =
1323- execute_response = self ._handle_execute_response (resp ,cursor )
1324-
1325- return ThriftResultSet (
1326- connection = cursor .connection ,
1327- execute_response = execute_response ,
1328- thrift_client = self ,
1329- buffer_size_bytes = max_bytes ,
1330- arraysize = max_rows ,
1331- use_cloud_fetch = cursor .connection .use_cloud_fetch ,
1332- >> >> >> > main
13331226 )
13341227
13351228def _handle_execute_response (self ,resp ,cursor ):