Esper终止分区上下文

Esper终止分区上下文,esper,complex-event-processing,Esper,Complex Event Processing,我有一股东西的蒸汽 create schema ThingEvent { thingID int, isLast boolean } 我想用相同的thingID一起处理事情,所以我创建了一个上下文 create context ThingContext partition by thingID from ThingEvent 然而,当我将isLast设置为true时,这意味着我们再也不会看到具有相同thingID的事件。但上下文将永远挂起,导致资源泄漏 我发现可以终止一个 cr

我有一股
东西的蒸汽

create schema ThingEvent {
  thingID int,
  isLast  boolean
}
我想用相同的
thingID
一起处理事情,所以我创建了一个上下文

create context ThingContext
  partition by thingID from ThingEvent
然而,当我将
isLast
设置为
true
时,这意味着我们再也不会看到具有相同
thingID
事件。但上下文将永远挂起,导致资源泄漏

我发现可以终止一个

create context ThingContext
  initiated by distinct(thingID) ThingEvent(isLast <> true) as startEvent
  terminated by ThingEvent(thingID = startEvent.thingID, isLast = true);

当我开始使用模式时,这会变得过于冗长。有没有一种方法可以两全其美?

我认为关键上下文没有终止条款

有一种编程方式可以终止任何上下文分区

有一个预定义的表达式别名“表达式别名{}”,而不是重复表达式

编辑:
此功能是在7.0.0版本中添加的

你就是男人!我已经放弃了,这个问题很难回答。
context ThingContext
  select *
  from ThingEvent(thingID=context.startEvent.thingID)
  output when terminated;