Skip to content
  • Catalin Besleaga's avatar
    30f97a91
    Bug#28007237 NULLIF RETURNS BOOLEAN IN CONTEXT OF JSON_ARRAYAGG AND JSON_OBJECTAGG'S VALUE · 30f97a91
    Catalin Besleaga authored
    Item_func has a function called is_bool_func() which returns true for
    the functions that should return a boolean value, to work around the
    lack of a proper BOOL datatype. Item_func_nullif is a subclass of
    Item_bool_func2 and it inherits is_bool_func() from Item_func_bool which
    returns true. This should not happen as NULLIF should have the datatype
    of the first argument of the function.
    The solution is to override is_bool_func() to return false.
    A complete solution will be possible when there will be a BOOL data
    type.
    30f97a91
    Bug#28007237 NULLIF RETURNS BOOLEAN IN CONTEXT OF JSON_ARRAYAGG AND JSON_OBJECTAGG'S VALUE
    Catalin Besleaga authored
    Item_func has a function called is_bool_func() which returns true for
    the functions that should return a boolean value, to work around the
    lack of a proper BOOL datatype. Item_func_nullif is a subclass of
    Item_bool_func2 and it inherits is_bool_func() from Item_func_bool which
    returns true. This should not happen as NULLIF should have the datatype
    of the first argument of the function.
    The solution is to override is_bool_func() to return false.
    A complete solution will be possible when there will be a BOOL data
    type.
Loading