From 6aae1ad3914f03caa52d05e05e34f96320ec55a6 Mon Sep 17 00:00:00 2001 From: akazz Date: Tue, 23 Jul 2019 13:34:56 +0300 Subject: [PATCH] Adjusted comments in the .h --- dbms/src/Functions/FunctionsLogical.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dbms/src/Functions/FunctionsLogical.h b/dbms/src/Functions/FunctionsLogical.h index 3b4761b0102..0f0a696bffd 100644 --- a/dbms/src/Functions/FunctionsLogical.h +++ b/dbms/src/Functions/FunctionsLogical.h @@ -18,7 +18,7 @@ #endif - /// TODO: Is it okay to reference this URL??? + /** Logical functions AND, OR, XOR and NOT support three-valued (or ternary) logic * https://en.wikibooks.org/wiki/Structured_Query_Language/NULLs_and_the_Three_Valued_Logic * @@ -83,10 +83,11 @@ struct XorImpl static inline constexpr bool isSaturable() { return false; } static inline constexpr bool isSaturatedValue(bool) { return false; } - /// TODO: (Is this legit???) Considering that CH uses UInt8 for representation of boolean values this function - /// returns 255 as "true" but the current implementation of logical functions - /// suggests that any nonzero value is "true" as well. Also the current code provides no guarantee - /// for "true" to be represented with the value of 1. + /** Considering that CH uses UInt8 for representation of boolean values this function + * returns 255 as "true" but the current implementation of logical functions suggests that + * any nonzero value is "true" as well. Also the current code provides no guarantee + * for "true" to be represented with the value of 1. + */ static inline constexpr ResultType apply(UInt8 a, UInt8 b) { return (a != b) ? Ternary::True : Ternary::False; } static inline constexpr bool specialImplementationForNulls() { return false; }