需求:
项目初始存入window一大批数据,当发送查询条件Event时,通过下面的EPL查询出符合条件的允许重复的数据,并将POJO相应的字段更该为指定数据返回
Esper版本:8.3.0,通过测试发现8.4,8.5以及开发中的8.6均存在该问题
on Event cle
select dataList.where(dcl => dcl.settleDate = cle.cashDate AND dcl.prodCode IN (cle.prodCodeList))
.selectFrom(i=>new com.win.event.POJO(i.prodCode,'1',cle.prodCodeList,cle.date,cle.before))
.union(dataList.where(dcl=>dcl.settleDate = cle.cashDate AND dcl.prodCode IN (cle.prodCodeList))
.selectFrom(i=>new com.win.event.POJO(i.prodCode,'2',cle.prodCodeList,cle.cashDate,cle.dateBefore)))**
AS dayCashList,cle.date date,cle.before before ,cle.prodCodeList prodCodeList
from Window
编译报错:
EPCompileException: Failed to validate select-clause expression 'dataList.where().selectFrom().un...(72 chars)': Enumeration method 'union' requires an expression yielding a collection of values of type 'POJO' as input parameter