Examples of LOCogroup


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

            "store B into '111';";
       
        LogicalPlan lp = Util.parseAndPreprocess(query, pc);
        Util.optimizeNewLP(lp);
        LOStore loStore = (LOStore)lp.getSinks().get(0);
        LOCogroup loCoGroup = (LOCogroup)lp.getPredecessors(loStore).get(0);
        LogicalFieldSchema groupFieldSchema = loCoGroup.getSchema().getField(0);
        Assert.assertTrue(groupFieldSchema.type==DataType.TUPLE);
        Assert.assertTrue(groupFieldSchema.schema==null);
    }
View Full Code Here

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

               
            // collect all uids used in the filter plan
            Set<Long> uids = collectUidFromExpPlan(filterPlan);
                               
            if( pred instanceof LOCogroup ) {
                LOCogroup cogrp = (LOCogroup)pred;
                if( preds.size() == 1 ) {
                    if( hasAll( (LogicalRelationalOperator)preds.get( 0 ), uids )    ) {
                        // Order by is ok if all UIDs can be found from previous operator.
                        return true;
                    }
                } else if ( 1 == cogrp.getExpressionPlans().get( 0 ).size() && !containUDF( filterPlan ) ) {
                    // Optimization is possible if there is only a single key.
                    // For regular cogroup, we cannot use UIDs to determine if filter can be pushed up.
                    // But if there is no UDF, it's okay, as only UDF can take bag field as input.
                    return true;
                }
View Full Code Here

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

            // collect all uids used in the filter plan
            Set<Long> uids = collectUidFromExpPlan(filterPlan);

            if( pred instanceof LOCogroup ) {
                LOCogroup cogrp = (LOCogroup)pred;
                if( preds.size() == 1 ) {
                    if( hasAll( (LogicalRelationalOperator)preds.get( 0 ), uids )    ) {
                        // Order by is ok if all UIDs can be found from previous operator.
                        return true;
                    }
                } else if ( 1 == cogrp.getExpressionPlans().get( 0 ).size() && !containUDF( filterPlan ) ) {
                    // Optimization is possible if there is only a single key.
                    // For regular cogroup, we cannot use UIDs to determine if filter can be pushed up.
                    // But if there is no UDF, it's okay, as only UDF can take bag field as input.
                    return true;
                }
View Full Code Here

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

        }
        return alias;
    }

    LOCogroup createGroupOp() {
        return new LOCogroup( plan );
    }
View Full Code Here

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

    private String convertCubeToFGPlan(SourceLocation loc, LOCube op, String inputAlias,
      List<String> operations, MultiMap<Integer, LogicalExpressionPlan> expressionPlans)
      throws FrontendException {

  LOForEach foreach = new LOForEach(plan);
  LOCogroup groupby = new LOCogroup(plan);
  LogicalPlan innerPlan = new LogicalPlan();
  LogicalRelationalOperator gen = new LOGenerate(innerPlan);

  injectForeachOperator(loc, op, foreach);
View Full Code Here

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

  }

    }

    LOCogroup createGroupOp() {
        return new LOCogroup( plan );
    }
View Full Code Here

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

    private String convertCubeToFGPlan(SourceLocation loc, LOCube op, String inputAlias,
        List<String> operations, MultiMap<Integer, LogicalExpressionPlan> expressionPlans)
        throws FrontendException {

        LOForEach foreach = new LOForEach(plan);
        LOCogroup groupby = new LOCogroup(plan);
        LogicalPlan innerPlan = new LogicalPlan();
        LogicalRelationalOperator gen = new LOGenerate(innerPlan);

        injectForeachOperator(loc, op, foreach);
View Full Code Here

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

            }
        }
    }

    LOCogroup createGroupOp() {
        return new LOCogroup( plan );
    }
View Full Code Here

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

            // collect all uids used in the filter plan
            Set<Long> uids = collectUidFromExpPlan(filterPlan);

            if( pred instanceof LOCogroup ) {
                LOCogroup cogrp = (LOCogroup)pred;
                if( preds.size() == 1 ) {
                    if( hasAll( (LogicalRelationalOperator)preds.get( 0 ), uids )    ) {
                        // Order by is ok if all UIDs can be found from previous operator.
                        return true;
                    }
                } else if ( 1 == cogrp.getExpressionPlans().get( 0 ).size() && !containUDF( filterPlan ) ) {
                    // Optimization is possible if there is only a single key.
                    // For regular cogroup, we cannot use UIDs to determine if filter can be pushed up.
                    // But if there is no UDF, it's okay, as only UDF can take bag field as input.
                    return true;
                }
View Full Code Here

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

    }

    @Override
    protected OperatorPlan buildPattern() {
        LogicalPlan plan = new LogicalPlan();
        LogicalRelationalOperator op = new LOCogroup(plan);
        plan.add(op);
        return plan;
    }
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.