Examples of IfExpression


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

            Object falseValue = null;
            if (node.getFalseValue().isPresent()) {
                falseValue = optimize(node.getFalseValue().get(), context);
            }

            return new IfExpression(toExpression(condition), toExpression(trueValue), toExpression(falseValue));
        }
View Full Code Here

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

        return process(query, context);
    }

    private static SelectItem aliasedYesNoToBoolean(String column, String alias)
    {
        Expression expression = new IfExpression(
                equal(nameReference(column), new StringLiteral("YES")),
                BooleanLiteral.TRUE_LITERAL,
                BooleanLiteral.FALSE_LITERAL);
        return new SingleColumn(expression, alias);
    }
View Full Code Here

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

            Object falseValue = null;
            if (node.getFalseValue().isPresent()) {
                falseValue = optimize(node.getFalseValue().get(), context);
            }

            return new IfExpression(toExpression(condition), toExpression(trueValue), toExpression(falseValue));
        }
View Full Code Here

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

        return process(query, context);
    }

    private static SelectItem aliasedYesNoToBoolean(String column, String alias)
    {
        Expression expression = new IfExpression(
                equal(nameReference(column), new StringLiteral("YES")),
                BooleanLiteral.TRUE_LITERAL,
                BooleanLiteral.FALSE_LITERAL);
        return new SingleColumn(expression, alias);
    }
View Full Code Here

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

        throw new SemanticException(NOT_SUPPORTED, node, "USE statement is not supported");
    }

    private static SelectItem aliasedYesNoToBoolean(String column, String alias)
    {
        Expression expression = new IfExpression(
                equal(nameReference(column), new StringLiteral("YES")),
                BooleanLiteral.TRUE_LITERAL,
                BooleanLiteral.FALSE_LITERAL);
        return new SingleColumn(expression, alias);
    }
View Full Code Here

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

        return process(query, context);
    }

    private static SelectItem aliasedYesNoToBoolean(String column, String alias)
    {
        Expression expression = new IfExpression(
                equal(nameReference(column), new StringLiteral("YES")),
                BooleanLiteral.TRUE_LITERAL,
                BooleanLiteral.FALSE_LITERAL);
        return new SingleColumn(expression, alias);
    }
View Full Code Here

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

        throw new SemanticException(NOT_SUPPORTED, node, "USE statement is not supported");
    }

    private static SelectItem aliasedYesNoToBoolean(String column, String alias)
    {
        Expression expression = new IfExpression(
                equal(nameReference(column), new StringLiteral("YES")),
                BooleanLiteral.TRUE_LITERAL,
                BooleanLiteral.FALSE_LITERAL);
        return new SingleColumn(expression, alias);
    }
View Full Code Here

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

            Object falseValue = null;
            if (node.getFalseValue().isPresent()) {
                falseValue = optimize(node.getFalseValue().get(), context);
            }

            return new IfExpression(toExpression(condition), toExpression(trueValue), toExpression(falseValue));
        }
View Full Code Here

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

        throw new SemanticException(NOT_SUPPORTED, node, "USE statement is not supported");
    }

    private static SelectItem aliasedYesNoToBoolean(String column, String alias)
    {
        Expression expression = new IfExpression(
                equal(nameReference(column), new StringLiteral("YES")),
                BooleanLiteral.TRUE_LITERAL,
                BooleanLiteral.FALSE_LITERAL);
        return new SingleColumn(expression, alias);
    }
View Full Code Here

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

        throw new SemanticException(NOT_SUPPORTED, node, "USE statement is not supported");
    }

    private static SelectItem aliasedYesNoToBoolean(String column, String alias)
    {
        Expression expression = new IfExpression(
                equal(nameReference(column), new StringLiteral("YES")),
                BooleanLiteral.TRUE_LITERAL,
                BooleanLiteral.FALSE_LITERAL);
        return new SingleColumn(expression, alias);
    }
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.