public void Run(RegressionEnvironment env) { var epl = "@Hint('MAX_FILTER_WIDTH=0') @name('s0') select * from SupportBean_IntAlphabetic((B=1 or C=1) and (D=1 or E=1))"; env.CompileDeployAddListenerMile(epl, "s0", 0); SupportFilterServiceHelper.AssertFilterSvcSingle(env.Statement("s0"), ".boolean_expression", FilterOperator.BOOLEAN_EXPRESSION); env.UndeployAll(); }
private static void RunAssertionInWVariable( RegressionEnvironment env, string epl) { env.CompileDeploy("@Name('s0') " + epl).AddListener("s0"); if (HasFilterIndexPlanBasicOrMore(env)) { SupportFilterServiceHelper.AssertFilterSvcSingle(env.Statement("s0"), "IntPrimitive", FilterOperator.IN_LIST_OF_VALUES); } TryAssertionWSubsFrom9To12(env); env.UndeployAll(); }
private static void RunAssertionInWSubs( RegressionEnvironment env, string epl) { CompileDeployWSubstitution(env, epl, CollectionUtil.BuildMap("p0", 10, "p1", 11)); if (HasFilterIndexPlanBasicOrMore(env)) { SupportFilterServiceHelper.AssertFilterSvcSingle(env.Statement("s0"), "IntPrimitive", FilterOperator.IN_LIST_OF_VALUES); } TryAssertionWSubsFrom9To12(env); env.UndeployAll(); }
private static void RunAssertionEqualsWSubsWCoercion( RegressionEnvironment env, string epl) { CompileDeployWSubstitution(env, epl, CollectionUtil.BuildMap("p0", 100)); if (HasFilterIndexPlanBasicOrMore(env)) { SupportFilterServiceHelper.AssertFilterSvcSingle(env.Statement("s0"), "LongPrimitive", FilterOperator.EQUAL); } var sb = new SupportBean(); sb.LongPrimitive = 100; env.SendEventBean(sb); Assert.IsTrue(env.Listener("s0").GetAndClearIsInvoked()); env.UndeployAll(); }
private static void TryAssertionEqualsWDeployTimeConst( RegressionEnvironment env, string epl) { if (HasFilterIndexPlanBasicOrMore(env)) { SupportFilterServiceHelper.AssertFilterSvcSingle(env.Statement("s0"), "TheString", FilterOperator.EQUAL); } env.SendEventBean(new SupportBean("abc", 0)); Assert.IsTrue(env.Listener("s0").GetAndClearIsInvoked()); env.SendEventBean(new SupportBean("x", 0)); Assert.IsFalse(env.Listener("s0").GetAndClearIsInvoked()); env.UndeployAll(); }
private static void TryAssertionRelOpWDeployTimeConst( RegressionEnvironment env, string epl) { if (HasFilterIndexPlanBasicOrMore(env)) { SupportFilterServiceHelper.AssertFilterSvcSingle(env.Statement("s0"), "IntPrimitive", FilterOperator.GREATER); } env.SendEventBean(new SupportBean("E1", 10)); Assert.IsFalse(env.Listener("s0").GetAndClearIsInvoked()); env.SendEventBean(new SupportBean("E2", 11)); Assert.IsTrue(env.Listener("s0").GetAndClearIsInvoked()); env.UndeployAll(); }
public void Run(RegressionEnvironment env) { var milestone = new AtomicLong(); // test 'or' rewrite var filtersAB = new[] { "TheString = 'a' or TheString = 'b'", "TheString = 'a' or 'b' = TheString", "'a' = TheString or 'b' = TheString", "'a' = TheString or TheString = 'b'", }; foreach (var filter in filtersAB) { var eplX = "@Name('s0') select * from SupportBean(" + filter + ")"; env.CompileDeployAddListenerMile(eplX, "s0", milestone.GetAndIncrement()); if (HasFilterIndexPlanBasicOrMore(env)) { SupportFilterServiceHelper.AssertFilterSvcSingle(env.Statement("s0"), "TheString", FilterOperator.IN_LIST_OF_VALUES); } env.SendEventBean(new SupportBean("a", 0)); Assert.IsTrue(env.Listener("s0").GetAndClearIsInvoked()); env.SendEventBean(new SupportBean("b", 0)); Assert.IsTrue(env.Listener("s0").GetAndClearIsInvoked()); env.SendEventBean(new SupportBean("c", 0)); Assert.IsFalse(env.Listener("s0").GetAndClearIsInvoked()); env.UndeployAll(); } var epl = "@Name('s0') select * from SupportBean(IntPrimitive = 1 and (TheString='a' or TheString='b'))"; env.CompileDeployAddListenerMile(epl, "s0", milestone.GetAndIncrement()); if (HasFilterIndexPlanBasicOrMore(env)) { SupportFilterServiceHelper.AssertFilterSvcTwo( env.Statement("s0"), "IntPrimitive", FilterOperator.EQUAL, "TheString", FilterOperator.IN_LIST_OF_VALUES); } env.UndeployAll(); }