public void TestDeepEquals() { Assert.IsFalse(ExprNodeUtility.DeepEquals(SupportExprNodeFactory.Make2SubNodeAnd(), SupportExprNodeFactory.Make3SubNodeAnd(), false)); Assert.IsFalse(ExprNodeUtility.DeepEquals(SupportExprNodeFactory.MakeEqualsNode(), SupportExprNodeFactory.MakeMathNode(), false)); Assert.IsTrue(ExprNodeUtility.DeepEquals(SupportExprNodeFactory.MakeMathNode(), SupportExprNodeFactory.MakeMathNode(), false)); Assert.IsFalse(ExprNodeUtility.DeepEquals(SupportExprNodeFactory.MakeMathNode(), SupportExprNodeFactory.Make2SubNodeAnd(), false)); Assert.IsTrue(ExprNodeUtility.DeepEquals(SupportExprNodeFactory.Make3SubNodeAnd(), SupportExprNodeFactory.Make3SubNodeAnd(), false)); }
public void TestAnalyzeEquals() { // s0.IntPrimitive = s1.IntBoxed ExprEqualsNode equalsNode = SupportExprNodeFactory.MakeEqualsNode(); QueryGraph graph = new QueryGraph(2, null, false); FilterExprAnalyzer.AnalyzeEqualsNode(equalsNode, graph, false); Assert.IsTrue(graph.IsNavigableAtAll(0, 1)); EPAssertionUtil.AssertEqualsExactOrder(new String[] { "IntPrimitive" }, QueryGraphTestUtil.GetStrictKeyProperties(graph, 0, 1)); EPAssertionUtil.AssertEqualsExactOrder(new String[] { "IntPrimitive" }, QueryGraphTestUtil.GetIndexProperties(graph, 1, 0)); EPAssertionUtil.AssertEqualsExactOrder(new String[] { "IntBoxed" }, QueryGraphTestUtil.GetStrictKeyProperties(graph, 1, 0)); EPAssertionUtil.AssertEqualsExactOrder(new String[] { "IntBoxed" }, QueryGraphTestUtil.GetIndexProperties(graph, 0, 1)); }
public void TestGetPlan() { var descList = new OuterJoinDesc[] { SupportOuterJoinDescFactory.MakeDesc("IntPrimitive", "s0", "IntBoxed", "s1", OuterJoinType.LEFT) }; var queryGraph = new QueryGraph(2, null, false); var plan = QueryPlanBuilder.GetPlan(_typesPerStream, new OuterJoinDesc[0], queryGraph, null, new HistoricalViewableDesc(5), _dependencyGraph, null, new StreamJoinAnalysisResult(2), true, null, null); AssertPlan(plan); plan = QueryPlanBuilder.GetPlan(_typesPerStream, descList, queryGraph, null, new HistoricalViewableDesc(5), _dependencyGraph, null, new StreamJoinAnalysisResult(2), true, null, null); AssertPlan(plan); FilterExprAnalyzer.Analyze(SupportExprNodeFactory.MakeEqualsNode(), queryGraph, false); plan = QueryPlanBuilder.GetPlan(_typesPerStream, descList, queryGraph, null, new HistoricalViewableDesc(5), _dependencyGraph, null, new StreamJoinAnalysisResult(2), true, null, null); AssertPlan(plan); plan = QueryPlanBuilder.GetPlan(_typesPerStream, new OuterJoinDesc[0], queryGraph, null, new HistoricalViewableDesc(5), _dependencyGraph, null, new StreamJoinAnalysisResult(2), true, null, null); AssertPlan(plan); }