v.24.12Backward Incompatible Changes
Functions greatest and least ignore NULLs, aligning with PostgreSQL but breaking MySQL compatibility.
Functionsgreatestandleastnow ignore NULL input values, whereas they previously returned NULL if one of the arguments was NULL. For example,SELECT greatest(1, 2, NULL)now returns 2. This makes the behavior compatible with PostgreSQL, but at the same time it breaks the compatibility with MySQL which returns NULL. To retain the previous behavior, set settingleast_greatest_legacy_null_behavior(default:false) totrue. #65519 #73344 (kevinyhzou).