Package org.apache.pig.piggybank.evaluation

Examples of org.apache.pig.piggybank.evaluation.ExtremalTupleByNthField.exec()


    }

    Tuple tupleInput = TupleFactory.getInstance().newTuple();
    tupleInput.append(input);

    Tuple out = o.exec(tupleInput);

    Assert.assertEquals(" 1", (String) out.get(1));
  }

  @Test
View Full Code Here


    }

    Tuple tupleInput = TupleFactory.getInstance().newTuple();
    tupleInput.append(input);

    Tuple out = o.exec(tupleInput);

    Assert.assertEquals(" 99", (String) out.get(1));
  }

  @Test
View Full Code Here

    }

    Tuple tupleInput = TupleFactory.getInstance().newTuple();
    tupleInput.append(input);

    Tuple out = o.exec(tupleInput);

    Assert.assertEquals(" 2, 99", (String) out.get(1));
  }

  @Test
View Full Code Here

    }

    Tuple tupleInput = TupleFactory.getInstance().newTuple();
    tupleInput.append(input);

    Tuple out = o.exec(tupleInput);

    Assert.assertEquals(" 0, 0", (String) out.get(1));
  }

  @Test
View Full Code Here

    input.add(t);

    Tuple tupleInput = TupleFactory.getInstance().newTuple();
    tupleInput.append(input);

    Tuple out = o.exec(tupleInput);

    // ironically "max" is smaller than "min"
    Assert.assertEquals("b", (String) out.get(1));
  }
View Full Code Here

        Arrays.asList(dbBigger, "bigger")));

    Tuple tupleInput = TupleFactory.getInstance().newTuple();
    tupleInput.append(input);

    Tuple out = o.exec(tupleInput);

    // DataBags are ordered by size, so the bigger one will be the one
    // containing 4 items
    Assert.assertEquals("bigger", out.get(1));
  }
View Full Code Here

        Arrays.asList(tpBigger, "bigger")));

    Tuple tupleInput = TupleFactory.getInstance().newTuple();
    tupleInput.append(input);

    Tuple out = o.exec(tupleInput);

    // DataBags are ordered by size, so the bigger one will be the one
    // containing 4 items
    Assert.assertEquals("smaller", out.get(1));
  }
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.