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

Examples of com.facebook.presto.sql.planner.plan.IndexJoinNode$EquiJoinClause


        @Override
        public SubPlanBuilder visitIndexJoin(IndexJoinNode node, Void context)
        {
            SubPlanBuilder current = node.getProbeSource().accept(this, context);
            current.setRoot(new IndexJoinNode(node.getId(), node.getType(), current.getRoot(), node.getIndexSource(), node.getCriteria()));
            return current;
        }
View Full Code Here


        public PlanNode rewriteIndexJoin(IndexJoinNode node, Void context, PlanRewriter<Void> planRewriter)
        {
            PlanNode probeSource = planRewriter.rewrite(node.getProbeSource(), context);
            PlanNode indexSource = planRewriter.rewrite(node.getIndexSource(), context);

            return new IndexJoinNode(node.getId(), node.getType(), probeSource, indexSource, canonicalizeIndexJoinCriteria(node.getCriteria()));
        }
View Full Code Here

                    .build();

            PlanNode probeSource = planRewriter.rewrite(node.getProbeSource(), probeInputs);
            PlanNode indexSource = planRewriter.rewrite(node.getIndexSource(), indexInputs);

            return new IndexJoinNode(node.getId(), node.getType(), probeSource, indexSource, node.getCriteria());
        }
View Full Code Here

            switch (node.getType()) {
                case INNER:
                    // Prefer the right candidate over the left candidate
                    if (rightIndexCandidate.isPresent()) {
                        return new IndexJoinNode(idAllocator.getNextId(), IndexJoinNode.Type.INNER, leftRewritten, rightIndexCandidate.get(), createEquiJoinClause(leftJoinSymbols, rightJoinSymbols));
                    }
                    else if (leftIndexCandidate.isPresent()) {
                        return new IndexJoinNode(idAllocator.getNextId(), IndexJoinNode.Type.INNER, rightRewritten, leftIndexCandidate.get(), createEquiJoinClause(rightJoinSymbols, leftJoinSymbols));
                    }
                    break;

                case LEFT:
                    if (rightIndexCandidate.isPresent()) {
                        return new IndexJoinNode(idAllocator.getNextId(), IndexJoinNode.Type.SOURCE_OUTER, leftRewritten, rightIndexCandidate.get(), createEquiJoinClause(leftJoinSymbols, rightJoinSymbols));
                    }
                    break;

                case RIGHT:
                    if (leftIndexCandidate.isPresent()) {
                        return new IndexJoinNode(idAllocator.getNextId(), IndexJoinNode.Type.SOURCE_OUTER, rightRewritten, leftIndexCandidate.get(), createEquiJoinClause(rightJoinSymbols, leftJoinSymbols));
                    }
                    break;

                default:
                    throw new IllegalArgumentException("Unknown type: " + node.getType());
View Full Code Here

            PlanNode rewrittenProbeSource = planRewriter.rewrite(node.getProbeSource(), new Context(context.getLookupSymbols(), context.getSuccess()));

            PlanNode source = node;
            if (rewrittenProbeSource != node.getProbeSource()) {
                source = new IndexJoinNode(node.getId(), node.getType(), rewrittenProbeSource, node.getIndexSource(), node.getCriteria());
            }

            return source;
        }
View Full Code Here

        @Override
        public SubPlanBuilder visitIndexJoin(IndexJoinNode node, Void context)
        {
            SubPlanBuilder current = node.getProbeSource().accept(this, context);
            current.setRoot(new IndexJoinNode(node.getId(), node.getType(), current.getRoot(), node.getIndexSource(), node.getCriteria()));
            return current;
        }
View Full Code Here

                switch (node.getType()) {
                    case INNER:
                        // Prefer the right candidate over the left candidate
                        if (rightIndexCandidate.isPresent()) {
                            return new IndexJoinNode(idAllocator.getNextId(), IndexJoinNode.Type.INNER, leftRewritten, rightIndexCandidate.get(), createEquiJoinClause(leftJoinSymbols, rightJoinSymbols));
                        }
                        else if (leftIndexCandidate.isPresent()) {
                            return new IndexJoinNode(idAllocator.getNextId(), IndexJoinNode.Type.INNER, rightRewritten, leftIndexCandidate.get(), createEquiJoinClause(rightJoinSymbols, leftJoinSymbols));
                        }
                        break;

                    case LEFT:
                        if (rightIndexCandidate.isPresent()) {
                            return new IndexJoinNode(idAllocator.getNextId(), IndexJoinNode.Type.SOURCE_OUTER, leftRewritten, rightIndexCandidate.get(), createEquiJoinClause(leftJoinSymbols, rightJoinSymbols));
                        }
                        break;

                    case RIGHT:
                        if (leftIndexCandidate.isPresent()) {
                            return new IndexJoinNode(idAllocator.getNextId(), IndexJoinNode.Type.SOURCE_OUTER, rightRewritten, leftIndexCandidate.get(), createEquiJoinClause(rightJoinSymbols, leftJoinSymbols));
                        }
                        break;

                    default:
                        throw new IllegalArgumentException("Unknown type: " + node.getType());
View Full Code Here

        public PlanNode rewriteIndexJoin(IndexJoinNode node, Void context, PlanRewriter<Void> planRewriter)
        {
            PlanNode probeSource = planRewriter.rewrite(node.getProbeSource(), context);
            PlanNode indexSource = planRewriter.rewrite(node.getIndexSource(), context);

            return new IndexJoinNode(node.getId(), node.getType(), probeSource, indexSource, canonicalizeIndexJoinCriteria(node.getCriteria()));
        }
View Full Code Here

            PlanNode rewrittenProbeSource = planRewriter.rewrite(node.getProbeSource(), new Context(context.getLookupSymbols(), context.getSuccess()));

            PlanNode source = node;
            if (rewrittenProbeSource != node.getProbeSource()) {
                source = new IndexJoinNode(node.getId(), node.getType(), rewrittenProbeSource, node.getIndexSource(), node.getCriteria());
            }

            return source;
        }
View Full Code Here

                    .build();

            PlanNode probeSource = planRewriter.rewrite(node.getProbeSource(), probeInputs);
            PlanNode indexSource = planRewriter.rewrite(node.getIndexSource(), indexInputs);

            return new IndexJoinNode(node.getId(), node.getType(), probeSource, indexSource, node.getCriteria());
        }
View Full Code Here

TOP

Related Classes of com.facebook.presto.sql.planner.plan.IndexJoinNode$EquiJoinClause

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.