v.20.4New Feature

Added Generic Variants for Least and Greatest Functions to Support Arbitrary Arguments

Added generic variants for functions least and greatest. Now they work with arbitrary number of arguments of arbitrary types. This fixes #4767 #10318 (alexey-milovidov)
Added generic versions of the least and greatest functions that support an arbitrary number of arguments with arbitrary types.

Why it matters

This enhancement resolves limitations in the previous implementations of least and greatest functions, allowing users to compare multiple values of different types in a single function call. It improves flexibility and usability for switching and filtering logic in queries.

How to use it

Use the least and greatest functions as before, but now you can pass any number of arguments with different types without restrictions. For example:

SELECT least(1, 2, 3, 4), greatest('a', 'b', 'c');