@@ -1035,9 +1035,6 @@ def _write_input_data_csv(self, stdin: IO, input_data: Any):
10351035 csv_writer = csv .writer (csv_buffer )
10361036 csv_writer .writerow (headers )
10371037 header_line = csv_buffer .getvalue ()
1038- if self .debug :
1039- sys .stderr .write (f"Debug: Writing headers: { header_line .strip ()} \n " )
1040- sys .stderr .flush ()
10411038 stdin .write (header_line .encode ('utf-8' ))
10421039 stdin .flush ()
10431040 headers_written = True
@@ -1050,9 +1047,6 @@ def _write_input_data_csv(self, stdin: IO, input_data: Any):
10501047 row = [str (record .get (h , '' )) for h in headers ]
10511048 csv_writer .writerow (row )
10521049 csv_line = csv_buffer .getvalue ()
1053- if self .debug :
1054- sys .stderr .write (f"Debug: Writing row: { csv_line .strip ()} \n " )
1055- sys .stderr .flush ()
10561050 stdin .write (csv_line .encode ('utf-8' ))
10571051 stdin .flush ()
10581052
@@ -1133,10 +1127,6 @@ def _read_output_stream_arrow_to_dicts(self, stdout: IO) -> Iterable[Dict[str, A
11331127 value = column [row_idx ].as_py () # Converts to native Python type
11341128 record [column_name ] = value
11351129
1136- if self .debug :
1137- sys .stderr .write (f"Debug: Arrow record: { record } \n " )
1138- sys .stderr .flush ()
1139-
11401130 yield record
11411131
11421132 except pa .lib .ArrowInvalid as e :
@@ -1164,22 +1154,14 @@ def _read_output_stream_csv(self, stdout: IO) -> Iterable[Dict[str, Any]]:
11641154 if not first_line :
11651155 return
11661156
1167- if self .debug :
1168- print (f"Debug: First line (headers): '{ first_line } '" )
1169-
11701157 # Parse headers
11711158 headers = list (csv .reader ([first_line ]))[0 ]
11721159
1173- if self .debug :
1174- print (f"Debug: Parsed headers: { headers } " )
1175-
11761160 # Read and parse remaining lines one by one
11771161 for line in stdout :
11781162 line_str = line .decode ('utf-8' ).strip ()
11791163 if line_str :
11801164 try :
1181- if self .debug :
1182- print (f"Debug: Processing line: '{ line_str } '" )
11831165 values = list (csv .reader ([line_str ]))[0 ]
11841166 # Pad values if fewer than headers
11851167 while len (values ) < len (headers ):
@@ -1188,8 +1170,6 @@ def _read_output_stream_csv(self, stdout: IO) -> Iterable[Dict[str, Any]]:
11881170 values = values [:len (headers )]
11891171 # Create record dict
11901172 record = dict (zip (headers , values ))
1191- if self .debug :
1192- print (f"Debug: Created record: { record } " )
11931173 yield record
11941174 except Exception as e :
11951175 if self .debug :
@@ -1304,9 +1284,6 @@ def stream(self) -> Iterable[Dict[str, Any]]:
13041284
13051285 # Handle input streaming
13061286 if self .input is not None :
1307- if self .debug :
1308- sys .stderr .write ("Debug: Starting input streaming\n " )
1309- sys .stderr .flush ()
13101287 # Write input data directly in the main thread
13111288 self ._write_input_data_sync (process .stdin , self .input )
13121289
@@ -1365,9 +1342,6 @@ def stream_arrow(self) -> pa.ipc.RecordBatchStreamReader:
13651342
13661343 # Handle input streaming
13671344 if self .input is not None :
1368- if self .debug :
1369- sys .stderr .write ("Debug: Starting input streaming\n " )
1370- sys .stderr .flush ()
13711345 # Write input data directly in the main thread
13721346 self ._write_input_data_sync (process .stdin , self .input )
13731347
@@ -1455,9 +1429,6 @@ def run(self) -> None:
14551429
14561430 # Handle input streaming if provided
14571431 if self .input is not None :
1458- if self .debug :
1459- sys .stderr .write ("Debug: Starting input streaming\n " )
1460- sys .stderr .flush ()
14611432 # Write input data directly in the main thread
14621433 self ._write_input_data_sync (process .stdin , self .input )
14631434
0 commit comments