@@ -128,11 +128,6 @@ def choose_checkpoints(self, bisection_factor: int) -> List[DbKey]:
128
128
return list (real_checkpoints [0 ])
129
129
>> >> >> > 8914 eaf (no full index scans )
130
130
131
- def find_checkpoints (self , checkpoints : List [DbKey ]) -> List [DbKey ]:
132
- "Takes a list of potential checkpoints and returns those that exist"
133
- where = In (self .key_column , checkpoints )
134
- return self .database .query (self ._make_select (where = where ), List [int ])
135
-
136
131
def segment_by_checkpoints (self , checkpoints : List [DbKey ]) -> List ["TableSegment" ]:
137
132
"Split the current TableSegment to a bunch of smaller ones, separate by the given checkpoints"
138
133
@@ -354,21 +349,13 @@ def _diff_tables(self, table1, table2, level=0, bisection_factor=None):
354
349
yield from diff
355
350
return
356
351
357
- # Find mutual checkpoints between the two tables
352
+ # Find checkpoints between the two tables
358
353
checkpoints = table1 .choose_checkpoints (bisection_factor )
359
354
assert checkpoints
360
- mutual_checkpoints = table2 .find_checkpoints ([Value (c ) for c in checkpoints ])
361
- mutual_checkpoints = list (set (mutual_checkpoints )) # Duplicate values are a problem!
362
- mutual_checkpoints .sort ()
363
- # print(f"level={level} cp={checkpoints} mc={mutual_checkpoints} bf={bisection_factor} t1start_key={table1.start_key} t1end_key={table1.end_key} t2_start_key={table2.start_key} t2_end_key={table2.end_key}")
364
- logger .debug (". " * level + f"Found { len (mutual_checkpoints )} mutual checkpoints (out of { len (checkpoints )} ) origin={ checkpoints } mutual={ mutual_checkpoints } " )
365
- if not mutual_checkpoints :
366
- raise Exception ("Tables are too different." )
367
-
368
355
369
356
# Create new instances of TableSegment between each checkpoint
370
- segmented1 = table1 .segment_by_checkpoints (mutual_checkpoints )
371
- segmented2 = table2 .segment_by_checkpoints (mutual_checkpoints )
357
+ segmented1 = table1 .segment_by_checkpoints (checkpoints )
358
+ segmented2 = table2 .segment_by_checkpoints (checkpoints )
372
359
# print(segmented1)
373
360
374
361
# Compare each pair of corresponding segments between table1 and table2
0 commit comments