@@ -474,39 +474,19 @@ def __init__(
474474 result_data: Result data from SEA response (optional)
475475 manifest: Manifest from SEA response (optional)
476476 """
477- # Extract and store SEA-specific properties
478- self .statement_id = (
479- execute_response .command_id .to_sea_statement_id ()
480- if execute_response .command_id
481- else None
482- )
483-
484- # Build the results queue
485- results_queue = None
486477
487478 if result_data :
488- from typing import cast , List
489-
490- # Convert description to the expected format
491- desc = None
492- if execute_response .description :
493- desc = cast (List [Tuple [Any , ...]], execute_response .description )
494-
495- results_queue = SeaResultSetQueueFactory .build_queue (
496- result_data ,
497- manifest ,
498- str (self .statement_id ),
499- description = desc ,
500- schema_bytes = execute_response .arrow_schema_bytes
501- if execute_response .arrow_schema_bytes
502- else None ,
503- max_download_threads = sea_client .max_download_threads ,
504- ssl_options = sea_client .ssl_options ,
505- sea_client = sea_client ,
506- lz4_compressed = execute_response .lz4_compressed ,
479+ queue = SeaResultSetQueueFactory .build_queue (
480+ sea_result_data = result_data ,
481+ manifest = manifest ,
482+ statement_id = execute_response .command_id .to_sea_statement_id (),
483+ description = execute_response .description ,
484+ schema_bytes = execute_response .arrow_schema_bytes ,
507485 )
486+ else :
487+ logger .warning ("No result data provided for SEA result set" )
488+ queue = JsonQueue ([])
508489
509- # Call parent constructor with common attributes
510490 super ().__init__ (
511491 connection = connection ,
512492 backend = sea_client ,
@@ -515,15 +495,13 @@ def __init__(
515495 command_id = execute_response .command_id ,
516496 status = execute_response .status ,
517497 has_been_closed_server_side = execute_response .has_been_closed_server_side ,
498+ results_queue = queue ,
518499 description = execute_response .description ,
519500 is_staging_operation = execute_response .is_staging_operation ,
520501 lz4_compressed = execute_response .lz4_compressed ,
521- arrow_schema_bytes = execute_response .arrow_schema_bytes or b"" ,
502+ arrow_schema_bytes = execute_response .arrow_schema_bytes ,
522503 )
523504
524- # Initialize queue for result data if not provided
525- self .results = results_queue or JsonQueue ([])
526-
527505 def _convert_to_row_objects (self , rows ):
528506 """
529507 Convert raw data rows to Row objects with named columns based on description.
0 commit comments