public BaseType transform(PartialFunction<BaseType, BaseType> rule) {
        return transformDown(rule);
    }
Collect the elements produced by `f` and not null.
indexr-query-opt/src/main/java/io/indexr/query/TreeNode.java