on master help sign in
fix broken static optimizer test
commit1123834019c301d3112b3052009eaa3e77188bbc authorAgentM <agentm@themactionfaction.com> dateSun 14 Jan 2018, 17:14 (9 years ago) parentdc0179e
1 file changed+3−2
test/Relation/StaticOptimizer.hs+3−2
test/Relation/StaticOptimizer.hs+3−2
@@ -124,11 +124,12 @@ 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− let expr1 = Restrict status30 (Union rvs (ExistingRelation stevens))
128− status30 = AttributeEqualityPredicate "status" (NakedAtomExpr (IntAtom 30))
127+ let status30 = AttributeEqualityPredicate "status" (NakedAtomExpr (IntAtom 30))
129128 relationsOrError = do
130129 stevens <- mkRelationFromList (attributes suppliersRel) [[TextAtom "S6", TextAtom "Stevens", IntegerAtom 50, TextAtom "Boston"]]
131130 let expectedExpr1 = Union (Restrict status30 rvs) (Restrict status30 (ExistingRelation stevens))
131+ expr1 = Restrict status30 (Union rvs (ExistingRelation stevens))
132+
132133 pure (expectedExpr1, applyStaticRestrictionPushdown expr1)
133134 either (assertFailure . (++) "stevens relation: " . show) (uncurry $ assertEqual "union restriction pushdown") relationsOrError
134135