Skip to content
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

Merged
merged 4 commits into from
Mar 6, 2024

Conversation

baldimir
Copy link
Contributor

@baldimir baldimir commented Mar 5, 2024

Fixes apache/incubator-kie-issues#986

For binary expression, only numeric arithmetic operations were considered during code generation.

Copy link
Contributor

@gitgabrio gitgabrio left a 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

@baldimir
Copy link
Contributor Author

baldimir commented Mar 5, 2024

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.

Copy link
Contributor

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mariofusco mariofusco merged commit 30e2da3 into apache:main Mar 6, 2024
9 checks passed
baldimir added a commit to baldimir/drools that referenced this pull request Mar 6, 2024
…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)
rgdoliveira pushed a commit to rgdoliveira/drools that referenced this pull request Mar 11, 2024
…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.
@baldimir baldimir deleted the tostring-in-constraint branch April 11, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

toString method is not applied to an object in a String rule constraint
5 participants