-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[kie-issues#986] Coerce object to String in executable model codegen #5761
Conversation
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.
Thanks @baldimir
I think a couple of minor modifications may be required
.../main/java/org/drools/model/codegen/execmodel/generator/expressiontyper/ExpressionTyper.java
Outdated
Show resolved
Hide resolved
.../drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/TypeCoercionTest.java
Show resolved
Hide resolved
Based on feedback, I redid the changes a bit. There were concerns, that it is not clear what side effects the original ArithmeticCoercionExpression class has, when reading/debugging the code. So I reorganized it a bit. |
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, thanks!
…pache#5761) * [kie-issues#986] Coerce object to String in executable model code generation. * [kie-issues#986] Simplify check for need of coercion. * Extract the check for coercion. * Update names of the classes for number and string arithmetic coercion. (cherry picked from commit 30e2da3)
…pache#5761) * [kie-issues#986] Coerce object to String in executable model code generation. * [kie-issues#986] Simplify check for need of coercion. * Extract the check for coercion. * Update names of the classes for number and string arithmetic coercion.
Fixes apache/incubator-kie-issues#986
For binary expression, only numeric arithmetic operations were considered during code generation.