You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tkobayas (via GitHub)" <gi...@apache.org> on 2024/04/25 03:24:44 UTC
[PR] [incubator-kie-drools-5868] exec-model : in operator with BigDecimal … [incubator-kie-drools]
tkobayas opened a new pull request, #5869:
URL: https://github.com/apache/incubator-kie-drools/pull/5869
…and int
- Enhance InOperator to handle numeric equals
- Convert BigDecimalLiteralExpr for OperatorSpec
**Issue**:
* https://github.com/apache/incubator-kie-drools/issues/5868
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-drools-5868] exec-model : in operator with BigDecimal … [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas merged PR #5869:
URL: https://github.com/apache/incubator-kie-drools/pull/5869
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-drools-5868] exec-model : in operator with BigDecimal … [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5869:
URL: https://github.com/apache/incubator-kie-drools/pull/5869#discussion_r1578801246
##########
drools-model/drools-canonical-model/src/main/java/org/drools/model/operators/InOperator.java:
##########
@@ -20,16 +20,16 @@
import org.drools.model.functions.Operator;
+import static org.drools.model.util.OperatorUtils.areEqual;
+
public enum InOperator implements Operator.MultipleValue<Object, Object> {
INSTANCE;
@Override
public boolean eval( Object a, Object[] bs ) {
for (Object b : bs) {
- if (a == null && b == null) {
- return true;
- } else if (a != null && a.equals( b )) {
+ if (areEqual(a, b)) {
Review Comment:
`OperatorUtils.areEqual` supports numeric equal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org