Examples of visit()


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

    boolean isFieldSimple(LogicalPlan lp) throws OptimizerException
    {
        TopLevelProjectFinder projectFinder = new TopLevelProjectFinder(lp);
           
        try {
            projectFinder.visit();
        } catch (VisitorException ve) {
            throw new OptimizerException();
        }
        if (projectFinder.getProjectSet()!=null && projectFinder.getProjectSet().size()==1)
        {
View Full Code Here

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

                return false;
            }
           
            for(LogicalPlan foreachPlan: foreach.getForEachPlans()) {
                UDFFinder udfFinder = new UDFFinder(foreachPlan);
                udfFinder.visit();
   
                // if any of the foreach's inner plans contain a UDF then return false
                if (udfFinder.foundAnyUDF()) {
                    return false;
                }
View Full Code Here

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

        // Set the logical plan values correctly in all the operators
        PlanSetter ps = new PlanSetter(lp);
        ps.visit();
       
        UnionOnSchemaSetter setUnionOnSchema = new UnionOnSchemaSetter(lp, pigContext);
        setUnionOnSchema.visit();
       
        // run through validator
        CompilationMessageCollector collector = new CompilationMessageCollector() ;
        boolean isBeforeOptimizer = true;
        validate(lp, collector, isBeforeOptimizer);
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.optimizer.SchemaCalculator.visit()

   
    public void rebuildSchema(LogicalPlan lp) throws VisitorException {
        SchemaRemover sr = new SchemaRemover(lp);
        sr.visit();
        SchemaCalculator sc = new SchemaCalculator(lp);
        sc.visit();
    }
   
}
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.optimizer.SchemaRemover.visit()

    public void unsetSchema() throws VisitorException{
        for(LogicalOperator input: getInputs()) {
            for(LogicalPlan plan: mGroupByPlans.get(input)) {
                SchemaRemover sr = new SchemaRemover(plan);
                sr.visit();
            }
        }
        super.unsetSchema();
    }
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.validators.InputOutputFileVisitor.visit()

            lpt.buildPlan("a = load '" + inputFileName + "' as (c:chararray, " +
                    "i:int,d:double);");
            LogicalPlan lp = lpt.buildPlan("store a into '" + outputFileName + "' using " +
                    "PigStorage();");
            InputOutputFileVisitor visitor = new InputOutputFileVisitor(lp, null, pig.getPigContext());
            visitor.visit();
        } catch (PlanValidationException e){
                // Since output file is not present, validation should pass
                // and not throw this exception.
                fail("Store validation test failed.");               
        } finally {
View Full Code Here

Examples of org.apache.pig.impl.physicalLayer.PhysicalOperator.visit()

    public LocalJob execute(ExecPhysicalPlan plan) throws ExecException {
        DataBag results = BagFactory.getInstance().newDefaultBag();
        try {
            PhysicalOperator pp = (PhysicalOperator)physicalOpTable.get(plan.getRoot());

            pp.visit(new InstantiateFuncCallerPOVisitor(pigContext, physicalOpTable));
            pp.open();
           
            Tuple t;
            while ((t = (Tuple) pp.getNext()) != null) {
                results.add(t);
View Full Code Here

Examples of org.apache.pig.newplan.FilterExtractor.visit()

        LogicalPlan newLogicalPlan = Util.buildLp(pigServer, query);
        Operator op = newLogicalPlan.getSinks().get(0);
        LOFilter filter = (LOFilter)newLogicalPlan.getPredecessors(op).get(0);
        FilterExtractor pColExtractor = new FilterExtractor(
                filter.getFilterPlan(), partitionCols);
        pColExtractor.visit();

        if(expPartFilterString == null) {
            Assert.assertEquals("Checking partition column filter:", null,
                    pColExtractor.getPColCondition());
        } else  {
View Full Code Here

Examples of org.apache.pig.newplan.PColFilterExtractor.visit()

          subPlan = new OperatorSubPlan( currentPlan );

          setupColNameMaps();
          PColFilterExtractor pColFilterFinder = new PColFilterExtractor(
              loFilter.getFilterPlan(), 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.newplan.PartitionFilterExtractor.visit()

          setupColNameMaps();

            FilterExtractor filterFinder = new PartitionFilterExtractor(loFilter.getFilterPlan(),
                    getMappedKeys(partitionKeys));
            filterFinder.visit();
            Expression partitionFilter = filterFinder.getPushDownExpression();

            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
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.