Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
according to the standard, boolean truth value might be: TRUE|FALSE|UNKNOWN.
similar queries to the following should be supported:
select 1 where null is unknown; select 1 where (select cast(null as boolean) ) is unknown;
"unknown" behaves similarily to null. (null=null) is null
"All boolean values and SQL truth values are comparable and all are assignable to a site of type boolean. The value True is greater than the value False, and any comparison involving the null value or an Unknown truth value will return an Unknown result. The values True and False may be assigned to any site having a boolean data type; assignment of Unknown, or the null value, is subject to the nullability characteristic of the target."
Truth table for the AND boolean operator
AND True False Unknown
True True False Unknown
False False False False
Unknown Unknown False Unknown
Truth table for the OR boolean operator
OR True False Unknown
True True True True
False True False Unknown
Unknown True Unknown Unknown
Truth table for the IS boolean operator
IS TRUE FALSE UNKNOWN
True True False False
False False True False
Unknown False False True
Attachments
Attachments
Issue Links
- is related to
-
HIVE-21293 Fix ambiguity in grammar warnings at compilation time (II)
- Closed