Module utils

Module utils 

Source
Expand description

Utility functions leveraged by the query optimizer rules

Structsยง

NamePreserver
Re-export of NamesPreserver for backwards compatibility, as it was initially placed here and then moved elsewhere. Handles ensuring the name of rewritten expressions is not changed.

Functionsยง

coerce ๐Ÿ”’
evaluate_expr_with_null_column ๐Ÿ”’
evaluates_to_null
Determines if an expression will always evaluate to null. c0 + 8 return true c0 IS NULL return false CASE WHEN c0 > 1 then 0 else 1 return false
has_all_column_refs ๐Ÿ”’
Returns true if expr contains all columns in schema_cols
is_restrict_null_predicate
Determine whether a predicate can restrict NULLs. e.g. c0 > 8 return true; c0 IS NULL return false.
log_plan
Log the plan in debug/tracing mode after some part of the optimizer runs
replace_qualified_name ๐Ÿ”’