@@ -375,31 +375,31 @@ def _populate_with_columns_data(self, table_ids, name_to_id, id_to_table_data, s
375
375
return len (data )
376
376
377
377
@tracked_method (agent_check_getter = agent_check_getter )
378
- def _populate_with_partitions_data (self , table_ids , id_to_table_data , cursor ):
378
+ def _populate_with_partitions_data (self , table_ids , table_id_to_table_data , cursor ):
379
379
rows = execute_query (PARTITIONS_QUERY .format (table_ids ), cursor )
380
380
for row in rows :
381
- id = row .pop ("id" , None )
382
- if id is not None :
383
- id_str = str (id )
384
- if id_str in id_to_table_data :
385
- id_to_table_data [ id_str ]["partitions" ] = row
381
+ table_id = row .pop ("id" , None )
382
+ if table_id is not None :
383
+ table_id_str = str (table_id )
384
+ if table_id_str in table_id_to_table_data :
385
+ table_id_to_table_data [ table_id_str ]["partitions" ] = row
386
386
else :
387
- self ._log .debug ("Partition found for an unkown table with the object_id: {}" .format (id_str ))
387
+ self ._log .debug ("Partition found for an unkown table with the object_id: {}" .format (table_id_str ))
388
388
else :
389
389
self ._log .debug ("Return rows of [{}] query should have id column" .format (PARTITIONS_QUERY ))
390
390
391
391
@tracked_method (agent_check_getter = agent_check_getter )
392
- def _populate_with_index_data (self , table_ids , id_to_table_data , cursor ):
392
+ def _populate_with_index_data (self , table_ids , table_id_to_table_data , cursor ):
393
393
rows = execute_query (INDEX_QUERY .format (table_ids ), cursor )
394
394
for row in rows :
395
- id = row .pop ("id" , None )
396
- if id is not None :
397
- id_str = str (id )
398
- if id_str in id_to_table_data :
399
- id_to_table_data [ id_str ].setdefault ("indexes" , [])
400
- id_to_table_data [ id_str ]["indexes" ].append (row )
395
+ table_id = row .pop ("id" , None )
396
+ if table_id is not None :
397
+ table_id_str = str (table_id )
398
+ if table_id_str in table_id_to_table_data :
399
+ table_id_to_table_data [ table_id_str ].setdefault ("indexes" , [])
400
+ table_id_to_table_data [ table_id_str ]["indexes" ].append (row )
401
401
else :
402
- self ._log .debug ("Index found for an unkown table with the object_id: {}" .format (id_str ))
402
+ self ._log .debug ("Index found for an unkown table with the object_id: {}" .format (table_id_str ))
403
403
else :
404
404
self ._log .debug ("Return rows of [{}] query should have id column" .format (INDEX_QUERY ))
405
405
0 commit comments