-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task/migrate esper 8.4 #176
Conversation
sudo docker exec iotp-pqa1 bash -c "cd /opt/iotp-pqa && behave ./tests/ --tags=onpremise --tags=-skip --tags=cb2cep" Failing scenarios: |
with esper 8.5+ EPL like
com.espertech.esper.compiler.client.EPCompileExceptionItem: Implicit conversion from datatype 'double' to 'Float' for property 'cast(cast(BloodPressure?,String),float)' is not allowed (strict filter type coercion) |
Enabling query plan: and trying with a rule with text: expression double js:fib(num) [ fib(num); function fib(n) { if(n <= 1) return n; return fib(n-1) + fib(n-2);} ] expression twoPI alias for { java.lang.Math.PI * 2 } SELECT "mirule2" as ruleName, *, 3 as r FROM iotEvent time=2021-09-16T15:05:51.852Z | lvl=DEBUG | from=::ffff:172.17.0.15 | corr=dabb741a-a074-4fdd-84eb-79f783c0da01; node=k6ah1LRew; perseocep=67 | trans=a3f9e91e-8fff-4419-bed7-806fe534b587 | srv=smartcity | subsrv=/ | op=parse | comp=perseo-core | msg=Error parsing statement [expression double js:fib(num) [ fib(num); function fib(n) { if(n <= 1) return n; return fib(n-1) + fib(n-2);} ] expression twoPI alias for { java.lang.Math.PI * 2 } context ctxt$smartcity$ SELECT "mirule2" as ruleName, *, 3 as r FROM iotEvent] only sencond expression works |
// To be included with using Esper 8.7 | ||
// @Override | ||
// public EPTypeClass getUnderlyingEPType() { | ||
// throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. | ||
// } | ||
|
||
// @Override | ||
// public EPType getPropertyEPType(java.lang.String string) { | ||
// throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. | ||
// } | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover to be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment for the future, when we try to update from 8.4 to 8.7, we will need it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NTC
//,"inlined_class \"\"\"\n public class MyUtility {\n public static double fib(int n) {\n if (n <= 1) {\n return n;\n }\n return fib(n-1) + fib(n-2);\n }\n }\n\"\"\"\n expression FIBC alias for { MyUtility.fib(5) > 3 } SELECT *, FIBC as r FROM iotEvent WHERE FIBC" | ||
//,"expression double js:fib(num) [\nfib(num);\nfunction fib(n) {\n if(n <= 1)\n return n;\n return fib(n-1) + fib(n-2);\n}\n]\nexpression FIBE alias for { fib(5) > 3 } SELECT *, FIBE as r FROM iotEvent WHERE FIBE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover commented lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment for the future, we expect that epl text will work with a future version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NTC
statement.addListener(new GenericListener()); | ||
} else { | ||
logger.debug(String.format("found repeated statement: %s", name)); | ||
statement = prevStmnt; | ||
} | ||
} | ||
return new Result(HttpServletResponse.SC_OK, | ||
Utils.Statement2JSONObject(statement).toString()); | ||
Utils.Statement2JSONObject(statement, epa, statement.getDeploymentId()).toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over indentation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 24494fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
issue #136
perseo-core/perseo-main/src/test/java/com/telefonica/iot/perseo/test/Help.java
Lines 53 to 56 in 8e2420e
com.espertech.esper.compiler.client.EPCompileExceptionItem: Implicit conversion from datatype 'double' to 'Float' for property 'cast(cast(BloodPressure?,String),float)' is not allowed (strict filter type coercion)