@@ -124,18 +124,11 @@ testPushDownRestrictionPredicate :: Test
124124testPushDownRestrictionPredicate = TestCase $ do
125125 -- (s union relation{tuple{city "Boston", s# "S6", sname "Stevens", status 50}}) where status = 30 == (s where status=30) union (relation{tuple{city "Boston", s# "S6", sname "Stevens", status 50}} where status=30)
126126 let rvs = RelationVariable "s" ()
127− stevens <- case mkRelationFromList (attributes suppliersRel) [
128− [TextAtom "S6", TextAtom "Stevens", IntegerAtom 50, TextAtom "Boston"]] of
129− Left err -> assertFailure ("stevens relation: " ++ show err) >> pure relationTrue
130− Right rel -> pure rel
131127 let expr1 = Restrict status30 (Union rvs (ExistingRelation stevens))
132128 status30 = AttributeEqualityPredicate "status" (NakedAtomExpr (IntAtom 30))
133129 relationsOrError = do
134130 stevens <- mkRelationFromList (attributes suppliersRel) [[TextAtom "S6", TextAtom "Stevens", IntegerAtom 50, TextAtom "Boston"]]
135− let expr1 = Restrict status30 (Union rvs (ExistingRelation stevens))
136− status30 = AttributeEqualityPredicate "status" (NakedAtomExpr (IntAtom 30))
137−
138− expectedExpr1 = Union (Restrict status30 rvs) (Restrict status30 (ExistingRelation stevens))
131+ let expectedExpr1 = Union (Restrict status30 rvs) (Restrict status30 (ExistingRelation stevens))
139132 pure (expectedExpr1, applyStaticRestrictionPushdown expr1)
140133 either (assertFailure . (++) "stevens relation: " . show) (uncurry $ assertEqual "union restriction pushdown") relationsOrError
141134