gitgabrio commented on issue #1744:
URL: 
https://github.com/apache/incubator-kie-issues/issues/1744#issuecomment-2604167982

   After deeper investigation, it turns out that there different problems 
related to this ticket.
   
   1
   The TCK range tests (e.g. `(> 10) = (10..null)` `(=10) = [10..10]`) seems 
to verify that the expression is different even if its _evaluation_ is the same.
   OUr code 
   1. translate the `(> 10) = (10..null)` to an InfixOpNode
   2. evaluate left and right part of the expression (inside EqExecutor)
   3. compares them
   
   So, first of all I think there is an issue in the InfixOpNode/EqExecutor, 
that, in this case, should verify if the expression is the same, and not if its 
evaluation is the same.
   
   `(> 10) = (10..null) -> FALSE` succeed "by chance" because we introduced 
the `undefined`, so the range returned is `(10..undefined)` , but actually the 
behavior is wrong (replacing (10..null) with (10..undefined) demonstrates it)
   
   2
   `(=10) = (=10) -> TRUE` fails because `(=10)` is not translated to `Range`, 
and when the code enter `BooleanEvalHelper.compare`, there is not an "if " 
dealing with UnaryTestImpl, and returns `null`
   
   Problem 2 could be solved implementing conversion of `(=10)` to `[10..10]` , 
but then problem 1 (`(=10) = [10..10] -> FALSE` )
   
   would still be there because, during execution,  left and right side would 
be evaluated to same object before comparison.
   
   @baldimir @yesamer wdyt ?
   
   
   
   


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

Reply via email to