Examples of visit()


Examples of org.apache.pig.impl.logicalLayer.CastFinder.visit()

                if (udfFinder.foundAnyUDF()) {
                    return false;
                }
               
                CastFinder castFinder = new CastFinder(foreachPlan);
                castFinder.visit();

                // TODO
                // if any of the foreach's inner plans contain a cast then return false
                // in the future the cast should be moved appropriately
                if (castFinder.foundAnyCast()) {
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.ColumnPruner.visit()

                    new DependencyOrderWalker<LogicalOperator, LogicalPlan>(mPlan));
            else
                columnPruner = new ColumnPruner(mPlan, forEach, pruneList,
                        new DependencyOrderWalker<LogicalOperator, LogicalPlan>(mPlan));
           
            columnPruner.visit();

            message.append("Columns pruned for " + load.getAlias() + ": ");
            for (int i=0;i<pruneList.size();i++)
            {
                message.append("$"+pruneList.get(i).second);
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.LOPrinter.visit()

        lpt.buildPlan("c = limit b 10;");
        LogicalPlan lp = lpt.buildPlan("store c into 'foo';");
        PigServer.SortInfoSetter siSetter = new PigServer.SortInfoSetter(lp);
        siSetter.visit();
        LOPrinter lpr = new LOPrinter(System.err, lp);
        lpr.visit();
        PhysicalPlan pp = buildPhysicalPlan(lp);
        SortInfo si = ((POStore)(pp.getLeaves().get(0))).getSortInfo();
        SortInfo expected = getSortInfo(
                Arrays.asList(new String[] {"i", "d"}),
                Arrays.asList(new Integer[] {0, 2}),
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.LogicalOperator.visit()

        parentEval = false;
    }

    public boolean optimize(LogicalPlan root) {
        LogicalOperator r = root.getOpTable().get(root.getRoot());
        r.visit(this);
        return optimize;
    }
}
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.PColFilterExtractor.visit()

            throws OptimizerException {
        try {
            setupColNameMaps();
            PColFilterExtractor pColFilterFinder = new PColFilterExtractor(
                    loFilter.getComparisonPlan(), getMappedKeys(partitionKeys));
            pColFilterFinder.visit();
            Expression partitionFilter = pColFilterFinder.getPColCondition();
            if(partitionFilter != null) {
                // the column names in the filter may be the ones provided by
                // the user in the schema in the load statement - we may need
                // to replace them with partition column names as given by
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.PlanSetter.visit()

       
        private void postProcess() throws IOException {
           
            // Set the logical plan values correctly in all the operators
            PlanSetter ps = new PlanSetter(lp);
            ps.visit();

            // The following code deals with store/load combination of
            // intermediate files. In this case we will replace the load operator
            // with a (implicit) split operator, iff the load/store
            // func is reversible (because that's when we can safely
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.ProjectFixerUpper.visit()

        }
       
        for (LogicalPlan lp : plans) {
            ProjectFixerUpper pfu =
                new ProjectFixerUpper(lp, after, newNode, projectionMapping);
            pfu.visit();
        }
    }

    /**
     * Insert a node in after an existing nodes.  This includes inserting
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.ProjectionMapCalculator.visit()

     */
    protected void rebuildProjectionMaps() throws VisitorException {
        ProjectionMapRemover pMapRemover = new ProjectionMapRemover(mPlan);
        pMapRemover.visit();
        ProjectionMapCalculator pMapCalculator = new ProjectionMapCalculator(mPlan);
        pMapCalculator.visit();
       
    }

    /**
     * Insert a node in between two existing nodes.  This includes inserting
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.ProjectionMapRemover.visit()

     * null out existing projection maps and then call getProjectionMap to rebuild them.
     * @throws VisitorException
     */
    protected void rebuildProjectionMaps() throws VisitorException {
        ProjectionMapRemover pMapRemover = new ProjectionMapRemover(mPlan);
        pMapRemover.visit();
        ProjectionMapCalculator pMapCalculator = new ProjectionMapCalculator(mPlan);
        pMapCalculator.visit();
       
    }

View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.ScalarFinder.visit()

        // When we start processing a store we look for scalars to add stores
        // to respective logical plans and temporary files to the attributes
        // Here we need to find if there are duplicates so that we do not add
        // two stores for one plan
        ScalarFinder scalarFinder = new ScalarFinder(lp);
        scalarFinder.visit();

        Map<LOUserFunc, Pair<LogicalPlan, LogicalOperator>> scalarMap = scalarFinder.getScalarMap();

        try {
            for(Map.Entry<LOUserFunc, Pair<LogicalPlan, LogicalOperator>> scalarEntry: scalarMap.entrySet()) {
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.