Examples of LogicalRelationalOperator


Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

    }

    @Override
    protected OperatorPlan buildPattern() {
        LogicalPlan plan = new LogicalPlan();
        LogicalRelationalOperator op = new LOCogroup(plan);
        plan.add(op);
        return plan;
    }
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

    @Override
    protected OperatorPlan buildPattern() {
        // the pattern that this rule looks for
        // is foreach -> filter
        LogicalPlan plan = new LogicalPlan();
        LogicalRelationalOperator foreach = new LOForEach(plan);
        LogicalRelationalOperator filter = new LOFilter(plan);
       
        plan.add(foreach);
        plan.add(filter);
        plan.connect(foreach, filter);
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

                Pair<List<Long>, List<Byte>> uidWithTypes = getFilterProjectionUids(filter);

                // See if the previous operators have uids from project
                List<Operator> preds = currentPlan.getPredecessors(foreach);           
                for(int j=0; j< preds.size(); j++) {
                    LogicalRelationalOperator logRelOp = (LogicalRelationalOperator)preds.get(j);
                    if (hasAll(logRelOp, uidWithTypes)) {
                        forEachPred = (LogicalRelationalOperator) preds.get(j);
                        return true;
                    }
                }
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

                while( iter.hasNext() ) {
                    op = iter.next();
                    if( op instanceof ProjectExpression ) {
                        ProjectExpression proj = (ProjectExpression)op;
                        if( proj.isProjectStar() ) {
                            LogicalRelationalOperator pred = (LogicalRelationalOperator)filter.getPlan().getPredecessors(filter).get(0);
                            LogicalSchema predSchema = pred.getSchema();
                            if (predSchema!=null) {
                                for (int i=0;i<predSchema.size();i++) {
                                    uids.add(predSchema.getField(i).uid);
                                    types.add(predSchema.getField(i).type);
                                }
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

    }

    @Override
    protected OperatorPlan buildPattern() {
        LogicalPlan plan = new LogicalPlan();
        LogicalRelationalOperator foreach = new LOForEach(plan);
        plan.add( foreach );
        return plan;
    }
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

    }

    @Override
    protected OperatorPlan buildPattern() {
        LogicalPlan plan = new LogicalPlan();
        LogicalRelationalOperator op = new LOFilter(plan);
        plan.add(op);
        return plan;
    }
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

    @Override
    protected OperatorPlan buildPattern() {
        // match each foreach.
        LogicalPlan plan = new LogicalPlan();
        LogicalRelationalOperator load = new LOLoad (null, null, plan, null );
        plan.add( load );
//        LogicalRelationalOperator filter = new LOFilter( plan );
//        plan.add( filter );
//        plan.connect( load, filter );
        return plan;
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

            // Get the uid for this projection.  It must match the uid of the
            // value it is projecting.
            long myUid = p.getFieldSchema().uid;
           
            // Find the operator this projection references
            LogicalRelationalOperator pred = p.findReferent();
           
            if (p.getAttachedRelationalOp() instanceof LOGenerate && p.getPlan().getSuccessors(p)==null) {
                // No need to adjust
                return;
            }
            else {
                // Get the schema for this operator and search it for the matching uid
                int match = -1;
                LogicalSchema schema = pred.getSchema();
                if (schema==null)
                    return;
                List<LogicalSchema.LogicalFieldSchema> fields = schema.getFields();
                for (int i = 0; i < fields.size(); i++) {
                    if (fields.get(i).uid == myUid) {
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

   
    @Override
    public LogicalSchema.LogicalFieldSchema getFieldSchema() throws FrontendException {
        if (fieldSchema!=null)
            return fieldSchema;
        LogicalRelationalOperator referent = findReferent();
       
        LogicalSchema schema = referent.getSchema();
       
        if (attachedRelationalOp instanceof LOGenerate && plan.getSuccessors(this)==null) {
            if (!(findReferent() instanceof LOInnerLoad)||
                    ((LOInnerLoad)findReferent()).sourceIsBag()) {
                String alias = findReferent().getAlias();
View Full Code Here

Examples of org.apache.pig.newplan.logical.relational.LogicalRelationalOperator

        preds = attachedRelationalOp.getPlan().getPredecessors(attachedRelationalOp);
        if (preds == null || input >= preds.size()) {
            throw new FrontendException("Projection with nothing to reference!", 2225);
        }
       
        LogicalRelationalOperator pred =
            (LogicalRelationalOperator)preds.get(input);
        if (pred == null) {
            throw new FrontendException("Cannot fine reference for " + this, 2226);
        }
        return pred;
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.