Examples of NullIfExpression


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

            }
            else if (first instanceof Slice && second instanceof Slice) {
                return first.equals(second) ? null : first;
            }

            return new NullIfExpression(toExpression(first), toExpression(second));
        }
View Full Code Here

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

            Type firstType = expressionTypes.get(node.getFirst());
            Type secondType = expressionTypes.get(node.getSecond());

            if (hasUnresolvedValue(first, second)) {
                return new NullIfExpression(toExpression(first, firstType), toExpression(second, secondType));
            }

            Type commonType = FunctionRegistry.getCommonSuperType(firstType, secondType).get();

            FunctionInfo firstCast = metadata.getExactOperator(OperatorType.CAST, commonType, ImmutableList.of(firstType));
View Full Code Here

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

            if (second == null) {
                return first;
            }

            if (hasUnresolvedValue(first, second)) {
                return new NullIfExpression(toExpression(first, expressionTypes.get(node.getFirst())), toExpression(second, expressionTypes.get(node.getSecond())));
            }

            if ((Boolean) invokeOperator(OperatorType.EQUAL, types(node.getFirst(), node.getSecond()), ImmutableList.of(first, second))) {
                return null;
            }
View Full Code Here

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

            Type firstType = expressionTypes.get(node.getFirst());
            Type secondType = expressionTypes.get(node.getSecond());

            if (hasUnresolvedValue(first, second)) {
                return new NullIfExpression(toExpression(first, firstType), toExpression(second, secondType));
            }

            Type commonType = FunctionRegistry.getCommonSuperType(firstType, secondType).get();

            FunctionInfo firstCast = metadata.getExactOperator(OperatorType.CAST, commonType, ImmutableList.of(firstType));
View Full Code Here

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

            Type firstType = expressionTypes.get(node.getFirst());
            Type secondType = expressionTypes.get(node.getSecond());

            if (hasUnresolvedValue(first, second)) {
                return new NullIfExpression(toExpression(first, firstType), toExpression(second, secondType));
            }

            Type commonType = FunctionRegistry.getCommonSuperType(firstType, secondType).get();

            FunctionInfo firstCast = metadata.getFunctionRegistry().getCoercion(firstType, commonType);
View Full Code Here

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

            }
            else if (first instanceof Slice && second instanceof Slice) {
                return first.equals(second) ? null : first;
            }

            return new NullIfExpression(toExpression(first), toExpression(second));
        }
View Full Code Here

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

            if (second == null) {
                return first;
            }

            if (hasUnresolvedValue(first, second)) {
                return new NullIfExpression(toExpression(first, expressionTypes.get(node.getFirst())), toExpression(second, expressionTypes.get(node.getSecond())));
            }

            if ((Boolean) invokeOperator(OperatorType.EQUAL, types(node.getFirst(), node.getSecond()), ImmutableList.of(first, second))) {
                return null;
            }
View Full Code Here

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

            Type firstType = expressionTypes.get(node.getFirst());
            Type secondType = expressionTypes.get(node.getSecond());

            if (hasUnresolvedValue(first, second)) {
                return new NullIfExpression(toExpression(first, firstType), toExpression(second, secondType));
            }

            Type commonType = FunctionRegistry.getCommonSuperType(firstType, secondType).get();

            FunctionInfo firstCast = metadata.getFunctionRegistry().getCoercion(firstType, commonType);
View Full Code Here

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

            }
            else if (first instanceof Slice && second instanceof Slice) {
                return first.equals(second) ? null : first;
            }

            return new NullIfExpression(toExpression(first), toExpression(second));
        }
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.