MCPcopy Create free account
hub / github.com/apache/pig / testBagFormat

Method testBagFormat

test/org/apache/pig/test/TestBagFormat.java:32–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30public class TestBagFormat {
31
32 @Test
33 public void testBagFormat() throws Exception {
34 DataBag bag = BagFactory.getInstance().newDefaultBag();
35
36 Tuple tuple_1 = TupleFactory.getInstance().newTuple(1);
37 tuple_1.set(0, 12);
38 bag.add(tuple_1);
39
40 Tuple tuple_2 = TupleFactory.getInstance().newTuple(1);
41 DataBag innerBag = BagFactory.getInstance().newDefaultBag();
42 innerBag.add(tuple_1);
43 tuple_2.set(0, (innerBag));
44 bag.add(tuple_2);
45
46 System.out.println(BagFormat.format(bag));
47 assertEquals("{(12),({(12)})}", BagFormat.format(bag));
48 }
49}

Callers

nothing calls this directly

Calls 8

getInstanceMethod · 0.95
getInstanceMethod · 0.95
setMethod · 0.95
addMethod · 0.95
formatMethod · 0.95
newTupleMethod · 0.65
newDefaultBagMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected