Skip to main content

find_common_subexprs

Function find_common_subexprs 

Source
pub fn find_common_subexprs(e: &Expr) -> Vec<(u64, String, usize)>
Expand description

Find common (repeated) subexpressions in e by canonical hash.

Returns one entry per unique subexpression appearing more than once: (canonical_hash, rendered_sql_string, occurrence_count).

Trivial leaves (identifiers, column references, literal values) are not reported — only structurally non-trivial subexpressions are candidates.