Example usage for com.google.common.collect TreeMultiset create

List of usage examples for com.google.common.collect TreeMultiset create

Introduction

In this page you can find the example usage for com.google.common.collect TreeMultiset create.

Prototype

public static <E extends Comparable> TreeMultiset<E> create() 

Source Link

Document

Creates a new, empty multiset, sorted according to the elements' natural order.

Usage

From source file:org.apache.hadoop.hive.ql.optimizer.SharedWorkOptimizer.java

private static Multiset<String> extractConjsIgnoringDPPPreds(ExprNodeDesc predicate) {
    List<ExprNodeDesc> conjsOp = ExprNodeDescUtils.split(predicate);
    Multiset<String> conjsOpString = TreeMultiset.create();
    for (int i = 0; i < conjsOp.size(); i++) {
        if (conjsOp.get(i) instanceof ExprNodeGenericFuncDesc) {
            ExprNodeGenericFuncDesc func = (ExprNodeGenericFuncDesc) conjsOp.get(i);
            if (GenericUDFInBloomFilter.class == func.getGenericUDF().getClass()) {
                continue;
            } else if (GenericUDFBetween.class == func.getGenericUDF().getClass()
                    && (func.getChildren().get(2) instanceof ExprNodeDynamicValueDesc
                            || func.getChildren().get(3) instanceof ExprNodeDynamicValueDesc)) {
                continue;
            }/*from w  w w . j  a  v  a2  s . c  om*/
        } else if (conjsOp.get(i) instanceof ExprNodeDynamicListDesc) {
            continue;
        }
        conjsOpString.add(conjsOp.get(i).toString());
    }
    return conjsOpString;
}