v.21.9Improvement

Check for Non-Deterministic Functions in Keys

Check for non-deterministic functions in keys, including constant expressions like now(), today(). This closes #25875. This closes #11333. #26235 (alexey-milovidov).
Added validation to detect non-deterministic functions, including constant expressions like now() and today(), in table keys.

Why it matters

This feature prevents the use of non-deterministic functions in keys to ensure data consistency and correctness, avoiding unexpected behavior caused by time-dependent or varying values in keys.

How to use it

When defining table keys, the system now automatically checks for non-deterministic functions in the key expressions and will reject them if found. Users should avoid using such functions like now() or today() in keys to comply with this validation.