awelless commented on code in PR #10030:
URL: https://github.com/apache/nifi/pull/10030#discussion_r2158822362


##########
nifi-commons/nifi-record-path/src/main/java/org/apache/nifi/record/path/filter/NumericBinaryOperatorFilter.java:
##########
@@ -65,10 +65,10 @@ protected boolean test(final FieldValue fieldValue, final 
Object rhsValue) {
         }
 
         final String fieldName = fieldValue.getField() == null ? "<Anonymous 
Inner Field>" : fieldValue.getField().getFieldName();
-        final Number lhsNumber = lhsLongCompatible ? 
DataTypeUtils.toLong(value, fieldName) : DataTypeUtils.toDouble(value, 
fieldName);

Review Comment:
   The result of this expression was always upcasted to`Double`, even when the 
first branch was chosen.
   To remediate this we should separate conversion to longs and doubles.



-- 
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]

Reply via email to