You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "AbdulSamad4068 (via GitHub)" <gi...@apache.org> on 2023/06/30 16:21:53 UTC

[GitHub] [age] AbdulSamad4068 commented on issue #1008: Implicit Boolean Casting causes unexpected behavior in Logical Boolean Operators

AbdulSamad4068 commented on issue #1008:
URL: https://github.com/apache/age/issues/1008#issuecomment-1614888277

   @dehowef You're right, the bug occurs when using logical gates like OR and AND with incompatible operand types in Apache AGE. 
   
   The implicit boolean casting in the transform phase causes these operands to be cast to boolean types without throwing type compatibility errors. This leads to unexpected behaviour, such as returning 'TRUE' for RETURN true OR 1 and 'FALSE' for RETURN FALSE AND 1. In contrast, SELECT 1 OR true correctly throws an error. 
   
   To resolve this, we need to modify the code to enforce type compatibility and ensuree consistent behaviour in logical boolean operators also testing that should validate the expected behaviour.


-- 
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: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org