Examples of BetweenPredicate


Examples of com.facebook.presto.sql.tree.BetweenPredicate

        return new InPredicate(reference(symbol), new InListExpression(LiteralInterpreter.toExpressions(values, Collections.nCopies(values.size(), type))));
    }

    private static BetweenPredicate between(Symbol symbol, Expression min, Expression max)
    {
        return new BetweenPredicate(reference(symbol), min, max);
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            if (range.isSingleValue()) {
                singleValues.add(toExpression(range.getLow().getValue()));
            }
            else if (isBetween(range)) {
                // Specialize the range with BETWEEN expression if possible b/c it is currently more efficient
                disjuncts.add(new BetweenPredicate(reference, toExpression(range.getLow().getValue()), toExpression(range.getHigh().getValue())));
            }
            else {
                List<Expression> rangeConjuncts = new ArrayList<>();
                if (!range.getLow().isLowerUnbounded()) {
                    switch (range.getLow().getBound()) {
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            }
            else if (value instanceof Slice && min instanceof Slice && max instanceof Slice) {
                return ((Slice) min).compareTo((Slice) value) <= 0 && ((Slice) value).compareTo((Slice) max) <= 0;
            }

            return new BetweenPredicate(toExpression(value), toExpression(min), toExpression(max));
        }
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            }
            else if (value instanceof Slice && min instanceof Slice && max instanceof Slice) {
                return ((Slice) min).compareTo((Slice) value) <= 0 && ((Slice) value).compareTo((Slice) max) <= 0;
            }

            return new BetweenPredicate(toExpression(value), toExpression(min), toExpression(max));
        }
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            if (max == null) {
                return null;
            }

            if (hasUnresolvedValue(value, min, max)) {
                return new BetweenPredicate(
                        toExpression(value, expressionTypes.get(node.getValue())),
                        toExpression(min, expressionTypes.get(node.getMin())),
                        toExpression(max, expressionTypes.get(node.getMax())));
            }
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            }
            else if (value instanceof Slice && min instanceof Slice && max instanceof Slice) {
                return ((Slice) min).compareTo((Slice) value) <= 0 && ((Slice) value).compareTo((Slice) max) <= 0;
            }

            return new BetweenPredicate(toExpression(value), toExpression(min), toExpression(max));
        }
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            if (range.isSingleValue()) {
                singleValues.add(toExpression(range.getLow().getValue(), type));
            }
            else if (isBetween(range)) {
                // Specialize the range with BETWEEN expression if possible b/c it is currently more efficient
                disjuncts.add(new BetweenPredicate(reference, toExpression(range.getLow().getValue(), type), toExpression(range.getHigh().getValue(), type)));
            }
            else {
                List<Expression> rangeConjuncts = new ArrayList<>();
                if (!range.getLow().isLowerUnbounded()) {
                    switch (range.getLow().getBound()) {
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            if (max == null) {
                return null;
            }

            if (hasUnresolvedValue(value, min, max)) {
                return new BetweenPredicate(
                        toExpression(value, expressionTypes.get(node.getValue())),
                        toExpression(min, expressionTypes.get(node.getMin())),
                        toExpression(max, expressionTypes.get(node.getMax())));
            }
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            if (max == null) {
                return null;
            }

            if (hasUnresolvedValue(value, min, max)) {
                return new BetweenPredicate(
                        toExpression(value, expressionTypes.get(node.getValue())),
                        toExpression(min, expressionTypes.get(node.getMin())),
                        toExpression(max, expressionTypes.get(node.getMax())));
            }
View Full Code Here

Examples of com.facebook.presto.sql.tree.BetweenPredicate

            }
            else if (value instanceof Slice && min instanceof Slice && max instanceof Slice) {
                return ((Slice) min).compareTo((Slice) value) <= 0 && ((Slice) value).compareTo((Slice) max) <= 0;
            }

            return new BetweenPredicate(toExpression(value), toExpression(min), toExpression(max));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.