@@ -98,7 +98,7 @@ tests = testGroup "Test.Database.LSMTree.Class.Monoidal"
9898 , testProperty' " snapshot-nochanges" $ prop_snapshotNoChanges tbl
9999 , testProperty' " snapshot-nochanges2" $ prop_snapshotNoChanges2 tbl
100100 , testProperty' " lookup-mupsert" $ prop_lookupUpdate tbl
101- , testProperty' " merge" $ prop_merge tbl
101+ , testProperty' " merge" $ prop_union tbl
102102 ]
103103
104104-------------------------------------------------------------------------------
@@ -450,33 +450,33 @@ prop_lookupUpdate h ups k v1 v2 = ioProperty $ do
450450 return $ res === V. singleton (Found (resolve v2 v1))
451451
452452-------------------------------------------------------------------------------
453- -- implement classic QC tests for monoidal table merges
453+ -- implement classic QC tests for monoidal table unions
454454-------------------------------------------------------------------------------
455455
456- prop_merge :: forall h .
456+ prop_union :: forall h .
457457 IsTable h
458458 => Proxy h -> [(Key , Update Value )] -> [(Key , Update Value )]
459459 -> [Key ] -> Property
460- prop_merge h ups1 ups2 (V. fromList -> testKeys) = ioProperty $ do
460+ prop_union h ups1 ups2 (V. fromList -> testKeys) = ioProperty $ do
461461 withTableNew h ups1 $ \ s hdl1 -> do
462462 Class. withTableNew s (testTableConfig h) $ \ hdl2 -> do
463463 updates hdl2 $ V. fromList ups2
464464
465- -- merge them.
466- Class. withTableMerge hdl1 hdl2 $ \ hdl3 -> do
465+ -- union them.
466+ Class. withTableUnion hdl1 hdl2 $ \ hdl3 -> do
467467
468- -- results in parts and the merge table
468+ -- results in parts and the union table
469469 res1 <- lookups hdl1 testKeys
470470 res2 <- lookups hdl2 testKeys
471471 res3 <- lookups hdl3 testKeys
472472
473- let mergeResult :: LookupResult Value -> LookupResult Value -> LookupResult Value
474- mergeResult r@ NotFound NotFound = r
475- mergeResult NotFound r@ (Found _) = r
476- mergeResult r@ (Found _) NotFound = r
477- mergeResult (Found v1) (Found v2) = Found (resolve v1 v2)
473+ let unionResult :: LookupResult Value -> LookupResult Value -> LookupResult Value
474+ unionResult r@ NotFound NotFound = r
475+ unionResult NotFound r@ (Found _) = r
476+ unionResult r@ (Found _) NotFound = r
477+ unionResult (Found v1) (Found v2) = Found (resolve v1 v2)
478478
479- return $ V. zipWith mergeResult res1 res2 == res3
479+ return $ V. zipWith unionResult res1 res2 == res3
480480
481481-------------------------------------------------------------------------------
482482-- implement classic QC tests for snapshots
0 commit comments