tkobayas commented on code in PR #6354:
URL:
https://github.com/apache/incubator-kie-drools/pull/6354#discussion_r2102063429
##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/expressiontyper/ExpressionTyper.java:
##########
@@ -278,7 +278,7 @@ private Optional<TypedExpression>
toTypedExpressionRec(Expression drlxExpr) {
if (drlxExpr instanceof PointFreeExpr pointFreeExpr) {
Optional<TypedExpression> optLeft =
toTypedExpressionRec(pointFreeExpr.getLeft());
Optional<TypedExpression> optRight =
pointFreeExpr.getRight().size() == 1 ?
toTypedExpressionRec(pointFreeExpr.getRight().get( 0 )) : Optional.empty();
- OperatorSpec opSpec = getOperatorSpec(pointFreeExpr.getRight(),
pointFreeExpr.getOperator());
+ OperatorSpec opSpec = getOperatorSpec(pointFreeExpr.getRight(),
pointFreeExpr.getFullOperatorString());
Review Comment:
OperatorSpec is taken by fullOperatorString as a key (e.g.
`str[startsWith``), because built-in operators are registered with the
fullOperatorString.
##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/expressiontyper/ExpressionTyper.java:
##########
@@ -278,7 +278,7 @@ private Optional<TypedExpression>
toTypedExpressionRec(Expression drlxExpr) {
if (drlxExpr instanceof PointFreeExpr pointFreeExpr) {
Optional<TypedExpression> optLeft =
toTypedExpressionRec(pointFreeExpr.getLeft());
Optional<TypedExpression> optRight =
pointFreeExpr.getRight().size() == 1 ?
toTypedExpressionRec(pointFreeExpr.getRight().get( 0 )) : Optional.empty();
- OperatorSpec opSpec = getOperatorSpec(pointFreeExpr.getRight(),
pointFreeExpr.getOperator());
+ OperatorSpec opSpec = getOperatorSpec(pointFreeExpr.getRight(),
pointFreeExpr.getFullOperatorString());
Review Comment:
OperatorSpec is taken by fullOperatorString as a key (e.g.
`str[startsWith`), because built-in operators are registered with the
fullOperatorString.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]