Package com.facebook.presto.sql.tree

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


        return new StringLiteral(value);
    }

    private static NullLiteral nullLiteral()
    {
        return new NullLiteral();
    }
View Full Code Here


        if (object instanceof Expression) {
            return (Expression) object;
        }

        if (object == null) {
            return new Cast(new NullLiteral(), type.getName());
        }

        if (type.equals(BIGINT)) {
            return new LongLiteral(object.toString());
        }
View Full Code Here

        if (object instanceof Boolean) {
            return new BooleanLiteral(object.toString());
        }

        if (object == null) {
            return new NullLiteral();
        }

        throw new UnsupportedOperationException("not yet implemented: " + object.getClass().getName());
    }
View Full Code Here

        return new StringLiteral(value);
    }

    private static NullLiteral nullLiteral()
    {
        return new NullLiteral();
    }
View Full Code Here

        return new StringLiteral(value);
    }

    private static NullLiteral nullLiteral()
    {
        return new NullLiteral();
    }
View Full Code Here

        if (object instanceof Expression) {
            return (Expression) object;
        }

        if (object == null) {
            return new Cast(new NullLiteral(), type.getName());
        }

        if (type.equals(BIGINT)) {
            return new LongLiteral(object.toString());
        }
View Full Code Here

        if (object instanceof Expression) {
            return (Expression) object;
        }

        if (object == null) {
            return new Cast(new NullLiteral(), type.getName());
        }

        if (type.equals(BIGINT)) {
            return new LongLiteral(object.toString());
        }
View Full Code Here

    @Override
    protected TypedByteCodeNode visitIfExpression(IfExpression node, CompilerContext context)
    {
        TypedByteCodeNode conditionValue = process(node.getCondition(), context);
        TypedByteCodeNode trueValue = process(node.getTrueValue(), context);
        TypedByteCodeNode falseValue = process(node.getFalseValue().or(new NullLiteral()), context);

        if (conditionValue.getType() == void.class) {
            return falseValue;
        }
        Preconditions.checkState(conditionValue.getType() == boolean.class);
View Full Code Here

        TypedByteCodeNode elseValue;
        if (node.getDefaultValue() != null) {
            elseValue = process(node.getDefaultValue(), context);
        }
        else {
            elseValue = process(new NullLiteral(), context);
        }

        List<TypedWhenClause> whenClauses = ImmutableList.copyOf(transform(node.getWhenClauses(), new Function<WhenClause, TypedWhenClause>()
        {
            @Override
View Full Code Here

        TypedByteCodeNode elseValue;
        if (node.getDefaultValue() != null) {
            elseValue = process(node.getDefaultValue(), context);
        }
        else {
            elseValue = process(new NullLiteral(), context);
        }
        List<TypedWhenClause> whenClauses = ImmutableList.copyOf(transform(node.getWhenClauses(), new Function<WhenClause, TypedWhenClause>()
        {
            @Override
            public TypedWhenClause apply(WhenClause whenClause)
View Full Code Here

TOP

Related Classes of com.facebook.presto.sql.tree.NullLiteral

Copyright © 2018 www.massapicom. 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.