@@ -305,59 +305,6 @@ def get_allowed_session_configurations() -> List[str]:
305305 """
306306 return list (ALLOWED_SESSION_CONF_TO_DEFAULT_VALUES_MAP .keys ())
307307
308- def fetch_chunk_links (
309- self , statement_id : str , chunk_index : int
310- ) -> List ["ExternalLink" ]:
311- """
312- Fetch links for a specific chunk index from the SEA API.
313-
314- Args:
315- statement_id: The statement ID
316- chunk_index: The chunk index to fetch
317-
318- Returns:
319- List[ExternalLink]: List of external links for the chunk
320-
321- Raises:
322- Error: If there's an error fetching the chunk links
323- """
324- from databricks .sql .backend .sea .models .responses import GetChunksResponse
325- from databricks .sql .backend .sea .models .base import ExternalLink
326-
327- logger .info (f"Fetching chunk { chunk_index } links for statement { statement_id } " )
328-
329- # Use the chunk-specific endpoint if we have a specific chunk index
330- path = self .CHUNK_PATH_WITH_ID_AND_INDEX .format (statement_id , chunk_index )
331-
332- response_data = self .http_client ._make_request (
333- method = "GET" ,
334- path = path ,
335- )
336-
337- # Extract the external_links from the response
338- external_links = response_data .get ("external_links" , [])
339- logger .info (
340- f"Received { len (external_links )} external links for chunk { chunk_index } "
341- )
342-
343- # Convert the links to ExternalLink objects
344- links = []
345- for link_data in external_links :
346- link = ExternalLink (
347- external_link = link_data .get ("external_link" , "" ),
348- expiration = link_data .get ("expiration" , "" ),
349- chunk_index = link_data .get ("chunk_index" , 0 ),
350- byte_count = link_data .get ("byte_count" , 0 ),
351- row_count = link_data .get ("row_count" , 0 ),
352- row_offset = link_data .get ("row_offset" , 0 ),
353- next_chunk_index = link_data .get ("next_chunk_index" ),
354- next_chunk_internal_link = link_data .get ("next_chunk_internal_link" ),
355- http_headers = link_data .get ("http_headers" , {}),
356- )
357- links .append (link )
358-
359- return links
360-
361308 def get_chunk_links (
362309 self , statement_id : str , chunk_index : int
363310 ) -> "GetChunksResponse" :
0 commit comments