get_pattern_instance_base

Function get_pattern_instance_base 

Source
pub fn get_pattern_instance_base(node: &TreeNode) -> PatternBaseResult
Expand description

Get the metric base for a pattern instance by analyzing direct children.

Uses the shortest leaf names from direct children to find common prefix/suffix.

If the initial analysis fails to find a common pattern, it tries excluding each child one at a time to detect outliers (e.g., a mismatched “base” field from indexer/computed tree merging).

Returns both the base and whether an outlier was detected.