@@ -133,19 +133,21 @@ def execute_task(task, cursor, table_name, iteration_cnt, row_count_limit=50000)
133133 # with snowflake.connector.connect(
134134 # **CONNECTION_PARAMETERS
135135 # ) as conn, conn.cursor() as cursor:
136- with adbc_driver_snowflake .dbapi .connect (
137- ** ADBC_CONNECTION_PARAMETERS
138- ) as conn , conn .cursor () as cursor :
136+ with (
137+ adbc_driver_snowflake .dbapi .connect (** ADBC_CONNECTION_PARAMETERS ) as conn ,
138+ conn .cursor () as cursor ,
139+ ):
139140 cursor .adbc .statement .set_options (
140141 ** {
141142 "adbc.snowflake.rpc.prefetch_concurrency" : 4 ,
142143 "adbc.rpc.result_queue_size" : 100 ,
143144 }
144145 )
145146
146- with open (perf_record_file , "w" ) as perf_file , open (
147- memory_record_file , "w"
148- ) as memory_file :
147+ with (
148+ open (perf_record_file , "w" ) as perf_file ,
149+ open (memory_record_file , "w" ) as memory_file ,
150+ ):
149151 # task = task_execution_decorator( # snowflake python connector
150152 # task_fetch_arrow_batches, perf_file, memory_file)
151153 # task = task_execution_decorator( # pyodbc
@@ -158,9 +160,10 @@ def execute_task(task, cursor, table_name, iteration_cnt, row_count_limit=50000)
158160 )
159161
160162 if can_draw :
161- with open (perf_record_file ) as perf_file , open (
162- memory_record_file
163- ) as memory_file :
163+ with (
164+ open (perf_record_file ) as perf_file ,
165+ open (memory_record_file ) as memory_file ,
166+ ):
164167 # sample rate
165168 perf_lines = perf_file .readlines ()
166169 perf_records = [float (line ) for line in perf_lines ]
0 commit comments