The use of least or greatest appears to have issues when combined with in and used in a function. The following function should always return true, but returns false if there is a second argument in the in.
create or replace function bizint.test(a int) return boolean
as begin
return a in (least(a), 9);
end;
select bizint.test(5); [ ] (false)
The same happens with the use of greatest.
Interestingly, there s no issue if I switch to chars from ints. Even if I force everything to be an int inside the in, it still fails.
I'm on Vertica 10.0.1
