Hi
I am upgrading out application from using Esper 2.3 to Esper 3.2. I am running into some syntax issues with many of our queries from 2.3.
I have the following simple object with getters and setters for every property.
public class SimpleEvent
{
private String uuid;
private Integer sourceId;
private Integer protocolId;
}
Previously I was able to register a query with the following syntax. Event is aliased to my SimpleEvent class.
"select * from Event as E_A1 where E_A1.sourceId = E_A1.protocolId";
when I attempt to register this query now I get the following exception:
com.espertech.esper.client.EPStatementException: Failed to resolve property 'E_A1.sourceId' to a stream or nested property in a stream [select * from Event as E_A1 where E_A1.sourceId = E_A1.protocolId]
at com.espertech.esper.core.StatementLifecycleSvcImpl.compile(StatementLifecycleSvcImpl.java:834)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createStopped(StatementLifecycleSvcImpl.java:180)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:153)
at com.espertech.esper.core.StatementLifecycleSvcImpl.createAndStart(StatementLifecycleSvcImpl.java:113)
at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:143)
at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:109)
I wrote a test that tries to register 4 slightly different versions of the query and 3 of the 4 are successful with this version failing. The 4 queries are:
"select * from Event where sourceId = protocolId";
"select * from Event as E_A1 where sourceId = protocolId";
"select * from Event as E_A1 where E_A1.sourceId = E_A1.protocolId"; <====== FAILS!
"select * from Event.win:length(4) as E_A1 where E_A1.protocolId = E_A1.sourceId";
From reading the documentation there doesn't seem to be any limitations that would prevent this from working and it worked in Esper 2. Am I misreading the new documentation or is there some sort of an issue that is at fault here.
Thanks
Steve