Skip to main content

is_non_foldable_function

Function is_non_foldable_function 

Source
pub fn is_non_foldable_function(name: &str) -> bool
Expand description

Check if a function must NOT be constant-folded.

Looks up the function in the global registry and checks FunctionInfo.deterministic. Functions not in the registry (CURRENT_TRANSACTION_ID, UUID, RAND — handled as special compiler ops or aliases) are hardcoded here.

Also used by query_classification.rs to detect non-deterministic functions for semantic cache bypass, and by evaluator_bridge.rs to reject pushdown of expressions containing non-deterministic functions.