fn vectorizable_builder(expr: &Expr) -> Option<bool> {
    use crate::ast::BuilderKind::*;
    match expr.kind {
        Ident(_) | NewBuilder(_) => {
            if let Builder(ref bk, _) = expr.ty {
                match *bk {
                    Appender(ref elem) | Merger(ref elem, _) => Some(elem.is_scalar()),
                    _ => Some(false),
                }
            } else {
                None
            }
        }
        MakeStruct { ref elems } => {
            let mut vectorizable = true;
            for elem in elems.iter() {
                match vectorizable_builder(elem) {
                    Some(val) => vectorizable &= val,
                    None => return None,
                }
            }
            Some(vectorizable)
        }
        _ => None,
    }
}
Checks if the expression is a vectorizable newbuilder.
Returns Some(true) if it is an appender, merger or a struct of builders with at least one appender or merger.
Returns Some(false) if it is a builder, struct of builders, but no appender or mergers.
Returns None if it is not a builder.
weld/src/optimizer/transforms/vectorizer.rs