Package com.facebook.presto.sql.tree

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


            ImmutableMap.Builder<Symbol, Expression> projections = ImmutableMap.builder();
            for (Symbol symbol : source.getOutputSymbols()) {
                Expression expression = new QualifiedNameReference(symbol.toQualifiedName());
                projections.put(symbol, expression);
            }
            Expression one = new LongLiteral("1");
            projections.put(sampleWeightSymbol, one);
            return new ProjectNode(idAllocator.getNextId(), source, projections.build());
        }
View Full Code Here


                    // HACK! we don't support cross joins right now, so put in a simple fake join predicate instead if all of the join clauses got simplified out
                    // TODO: remove this code when cross join support is added
                    Iterable<Expression> simplifiedJoinConjuncts = transform(extractConjuncts(newJoinPredicate), simplifyExpressions());
                    simplifiedJoinConjuncts = filter(simplifiedJoinConjuncts, not(Predicates.<Expression>equalTo(BooleanLiteral.TRUE_LITERAL)));
                    if (Iterables.isEmpty(simplifiedJoinConjuncts)) {
                        simplifiedJoinConjuncts = ImmutableList.<Expression>of(new ComparisonExpression(ComparisonExpression.Type.EQUAL, new LongLiteral("0"), new LongLiteral("0")));
                    }

                    // Create new projections for the new join clauses
                    ImmutableList.Builder<JoinNode.EquiJoinClause> builder = ImmutableList.builder();
                    for (Expression conjunct : simplifiedJoinConjuncts) {
View Full Code Here

TOP

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

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.