private void RunAssertionFilterIndexTypeAssertion(EPServiceProvider epService) { string eplNoIndex = "select * from SupportSpatialEventRectangle(rectangle(0, 0, 1, 1).intersects(rectangle(x, y, width, height)))"; SupportFilterHelper.AssertFilterMulti(epService, eplNoIndex, "SupportSpatialEventRectangle", new SupportFilterItem[][] { new [] { SupportFilterItem.BoolExprFilterItem } }); string eplIndexed = "expression myindex {mxcifquadtree(0, 0, 100, 100)}" + "select * from SupportSpatialEventRectangle(rectangle(10, 20, 5, 6, filterindex:myindex).intersects(rectangle(x, y, width, height)))"; EPStatement statement = SupportFilterHelper.AssertFilterMulti(epService, eplIndexed, "SupportSpatialEventRectangle", new SupportFilterItem[][] { new [] { new SupportFilterItem("x,y,width,height/myindex/mxcifquadtree/0.0,0.0,100.0,100.0,4.0,20.0", FilterOperator.ADVANCED_INDEX) } }); var listener = new SupportUpdateListener(); statement.Events += listener.Update; SendAssertEventRectangle(epService, listener, 10, 20, 0, 0, true); SendAssertEventRectangle(epService, listener, 9, 19, 0.9999, 0.9999, false); SendAssertEventRectangle(epService, listener, 9, 19, 1, 1, true); SendAssertEventRectangle(epService, listener, 15, 26, 0, 0, true); SendAssertEventRectangle(epService, listener, 15.001, 26.001, 0, 0, false); epService.EPAdministrator.DestroyAllStatements(); }
private void RunAssertionFilterIndexTypeAssertion(EPServiceProvider epService) { var eplNoIndex = "select * from SupportSpatialAABB(point(0, 0).inside(rectangle(x, y, width, height)))"; SupportFilterHelper.AssertFilterMulti(epService, eplNoIndex, "SupportSpatialAABB", new SupportFilterItem[][] { new [] { SupportFilterItem.BoolExprFilterItem } }); var eplIndexed = "expression myindex {pointregionquadtree(0, 0, 100, 100)}" + "select * from SupportSpatialAABB(point(0, 0, filterindex:myindex).inside(rectangle(x, y, width, height)))"; SupportFilterHelper.AssertFilterMulti(epService, eplIndexed, "SupportSpatialAABB", new SupportFilterItem[][] { new [] { new SupportFilterItem("x,y,width,height/myindex/pointregionquadtree/0.0,0.0,100.0,100.0,4.0,20.0", FilterOperator.ADVANCED_INDEX) } }); epService.EPAdministrator.DestroyAllStatements(); }