Package org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhysicalPlan.attachInput()


            POCast newOp = new POCast(new OperatorKey("", r.nextLong()), -1);
            plan = constructPlan(newOp);
            Tuple t = tf.newTuple();
            Long input = new Long(r.nextLong());
            t.append(input);
            plan.attachInput(t);
            Result res = newOp.getNext(new Long(0));
            if(res.returnStatus == POStatus.STATUS_OK) {
                //System.out.println(res.result + " : " + i);
                assertEquals(input, res.result);
            }
View Full Code Here


            POCast newOp = new POCast(new OperatorKey("", r.nextLong()), -1);
            plan = constructPlan(newOp);
            Tuple t = tf.newTuple();
            Double input = new Double(r.nextDouble());
            t.append(input);
            plan.attachInput(t);
            Result res = newOp.getNext(new Double(0));
            if(res.returnStatus == POStatus.STATUS_OK) {
                //System.out.println(res.result + " : " + i);
                assertEquals(input, res.result);
            }
View Full Code Here

            POCast newOp = new POCast(new OperatorKey("", r.nextLong()), -1);
            plan = constructPlan(newOp);
            Tuple t = tf.newTuple();
            Tuple input = GenRandomData.genRandSmallTuple("test", 1);
            t.append(input);
            plan.attachInput(t);
            Result res = newOp.getNext(tf.newTuple());
            if(res.returnStatus == POStatus.STATUS_OK) {
                //System.out.println(res.result + " : " + str);
                assertEquals(input, res.result);
            }
View Full Code Here

            POCast newOp = new POCast(new OperatorKey("", r.nextLong()), -1);
            plan = constructPlan(newOp);
            Tuple t = tf.newTuple();
            DataBag input = GenRandomData.genRandSmallTupDataBag(r, 10, 100);
            t.append(input);
            plan.attachInput(t);
            Result res = newOp.getNext(DefaultBagFactory.getInstance().newDefaultBag());
            if(res.returnStatus == POStatus.STATUS_OK) {
                //System.out.println(res.result + " : " + str);
                assertEquals(input, res.result);
            }
View Full Code Here

            Tuple t = tf.newTuple();
            Map<String, Object> input = new HashMap<String, Object>();
            input.put("key1", "value1");
            input.put("key2", "value2");
            t.append(input);
            plan.attachInput(t);
            Result res = newOp.getNext(new HashMap<String, Object>());
            if(res.returnStatus == POStatus.STATUS_OK) {
                //System.out.println(res.result + " : " + str);
                assertEquals(input, res.result);
            }
View Full Code Here

      plan.attachInput(tNew);
      Result res = op.getNext(t);
      //System.out.println(res.result + " : " + t);
      assertEquals(t, res.result);
     
      planToTestBACasts.attachInput(tNew);
      res = opWithInputTypeAsBA.getNext(t);
      assertEquals(t, res.result);
    }
   
    {
View Full Code Here

      DataBag b = (DataBag) t.get(0);
      Result res = op.getNext(b);
      //System.out.println(res.result + " : " + t);
      assertEquals(b, res.result);
     
      planToTestBACasts.attachInput(t);
      res = opWithInputTypeAsBA.getNext(b);
      assertEquals(b, res.result);
    }
   
    {
View Full Code Here

      Map map = (Map) t.get(0);
      Result res = op.getNext(map);
      //System.out.println(res.result + " : " + t);
      assertEquals(map, res.result);
        
      planToTestBACasts.attachInput(t);
      res = opWithInputTypeAsBA.getNext(map);
      assertEquals(map, res.result);
    }
   
    {
View Full Code Here

   
    prj.setResultType(DataType.INTEGER);     
   
    for(Iterator<Tuple> it = bag.iterator(); it.hasNext(); ) {
      Tuple t = it.next();
      plan.attachInput(t);
      if(t.get(0) == null) {
       
        Integer result  = (Integer)op.getNext((Integer)null).result;
        assertEquals( null, result);
View Full Code Here

   
    prj.setResultType(DataType.FLOAT);
   
    for(Iterator<Tuple> it = bag.iterator(); it.hasNext(); ) {
      Tuple t = it.next();
      plan.attachInput(t);
      if(t.get(0) == null) {
       
        Integer result  = (Integer)op.getNext((Integer)null).result;
        assertEquals( null, result);
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.