Esper 8.8.0 statement conversion to statement model and back to statement bug
DevDrake opened this issue · comments
DevDrake commented
Hi,
There is a bug in conversion of String statement to EPStatementObjectModel and then getting toEPL().
here is an test that shows the problem, note TestFill can be anything:
@Test
public final void Bug() throws EPCompileException {
final String query = "@Name('test') select 7.29d/3/100, (7.29d/(3*100)), (7.29d/3/100) from TestFill";
final Configuration config = getConfiguration();
config.getCommon().addEventType(TestFill.class);
EPStatementObjectModel model = EPCompilerProvider.getCompiler().eplToModel(query, config);
Assert.assertEquals(query, model.toEPL());
}
the results are:
org.junit.ComparisonFailure:
Expected :@Name('test') select 7.29d/3/100, (7.29d/(3*100)), (7.29d/3/100) from TestFill
Actual :@Name('test') select 7.29d/3/100, 7.29d/3*100, 7.29d/3/100 from TestFill
this is serious as 7.29d/(3 * 100) != 7.29d/3 * 100