Package com.facebook.presto.sql.planner.plan

Examples of com.facebook.presto.sql.planner.plan.PlanNode.accept()


        @Override
        public Void visitSink(SinkNode node, Void context)
        {
            PlanNode source = node.getSource();
            source.accept(this, context); // visit child

            verifyUniqueId(node);

            return null;
        }
View Full Code Here


        @Override
        public Void visitTableWriter(TableWriterNode node, Void context)
        {
            PlanNode source = node.getSource();
            source.accept(this, context); // visit child

            verifyUniqueId(node);

            if (node.getSampleWeightSymbol().isPresent()) {
                Preconditions.checkArgument(source.getOutputSymbols().contains(node.getSampleWeightSymbol().get()), "Invalid node. Sample weight symbol (%s) is not in source plan output (%s)", node.getSampleWeightSymbol().get(), node.getSource().getOutputSymbols());
View Full Code Here

        @Override
        public Void visitTableCommit(TableCommitNode node, Void context)
        {
            PlanNode source = node.getSource();
            Preconditions.checkArgument(source instanceof TableWriterNode, "Invalid node. TableCommit source must be a TableWriter not %s", source.getClass().getSimpleName());
            source.accept(this, context); // visit child

            verifyUniqueId(node);

            return null;
        }
View Full Code Here

        @Override
        public Void visitMaterializedViewWriter(MaterializedViewWriterNode node, Void context)
        {
            PlanNode source = node.getSource();
            source.accept(this, context); // visit child

            verifyUniqueId(node);

            return null;
        }
View Full Code Here

        public Void visitUnion(UnionNode node, Void context)
        {
            for (int i = 0; i < node.getSources().size(); i++) {
                PlanNode subplan = node.getSources().get(i);
                Preconditions.checkArgument(subplan.getOutputSymbols().containsAll(node.sourceOutputLayout(i)), "UNION subplan must provide all of the necessary symbols");
                subplan.accept(this, context); // visit child
            }

            verifyUniqueId(node);

            return null;
View Full Code Here

            for (int i = 0; i < node.getSources().size(); i++) {
                PlanNode subplan = node.getSources().get(i);
                List<Symbol> expectedLayout = node.sourceOutputLayout(i);

                LocalExecutionPlanContext subContext = context.createSubContext();
                PhysicalOperation source = subplan.accept(this, subContext);
                List<OperatorFactory> operatorFactories = new ArrayList<>(source.getOperatorFactories());

                boolean projectionMatchesOutput = IterableTransformer.on(source.getLayout().entrySet())
                        .orderBy(inputOrdering().onResultOf(MoreFunctions.<Symbol, Input>valueGetter()))
                        .transform(MoreFunctions.<Symbol, Input>keyGetter())
View Full Code Here

            for (int i = 0; i < node.getSources().size(); i++) {
                PlanNode subplan = node.getSources().get(i);
                List<Symbol> expectedLayout = node.sourceOutputLayout(i);

                LocalExecutionPlanContext subContext = context.createSubContext();
                PhysicalOperation source = subplan.accept(this, subContext);
                List<OperatorFactory> operatorFactories = new ArrayList<>(source.getOperatorFactories());

                boolean projectionMatchesOutput = IterableTransformer.on(source.getLayout().entrySet())
                        .orderBy(Ordering.<Integer>natural().onResultOf(MoreFunctions.<Symbol, Integer>valueGetter()))
                        .transform(MoreFunctions.<Symbol, Integer>keyGetter())
View Full Code Here

        @Override
        public Void visitAggregation(AggregationNode node, Void context)
        {
            PlanNode source = node.getSource();
            source.accept(this, context); // visit child

            verifyUniqueId(node);

            Preconditions.checkArgument(source.getOutputSymbols().containsAll(node.getGroupBy()), "Invalid node. Group by symbols (%s) not in source plan output (%s)", node.getGroupBy(), node.getSource().getOutputSymbols());
View Full Code Here

        @Override
        public Void visitMarkDistinct(MarkDistinctNode node, Void context)
        {
            PlanNode source = node.getSource();
            source.accept(this, context); // visit child

            verifyUniqueId(node);

            Preconditions.checkArgument(source.getOutputSymbols().containsAll(node.getDistinctSymbols()), "Invalid node. Mark distinct symbols (%s) not in source plan output (%s)", node.getDistinctSymbols(), source.getOutputSymbols());
View Full Code Here

        @Override
        public Void visitWindow(WindowNode node, Void context)
        {
            PlanNode source = node.getSource();
            source.accept(this, context); // visit child

            verifyUniqueId(node);

            Preconditions.checkArgument(source.getOutputSymbols().containsAll(node.getPartitionBy()), "Invalid node. Partition by symbols (%s) not in source plan output (%s)", node.getPartitionBy(), node.getSource().getOutputSymbols());
            Preconditions.checkArgument(source.getOutputSymbols().containsAll(node.getOrderBy()), "Invalid node. Order by symbols (%s) not in source plan output (%s)", node.getOrderBy(), node.getSource().getOutputSymbols());
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.