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

Method testGroupOptions

test/org/apache/pig/test/TestPinOptions.java:74–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 @Test
75 public void testGroupOptions() throws Exception {
76 pigServer.setBatchOn();
77 pigServer.registerQuery("a = load 'tmp1' as (foo, bar);");
78 pigServer.registerQuery("b = group a by foo;");
79 pigServer.registerQuery("store b into 'tmp2';");
80
81 LOCogroup op = (LOCogroup)TestPigStats.getLogicalPlan(pigServer).findByAlias("b");
82 assertFalse(op.isPinnedOption(LOCogroup.OPTION_GROUPTYPE));
83 pigServer.discardBatch();
84
85 pigServer.setBatchOn();
86 pigServer.registerQuery("a = load 'tmp' as (foo, bar);");
87 pigServer.registerQuery("b = group a by foo using 'collected';");
88 pigServer.registerQuery("store b into 'tmp2';");
89 op = (LOCogroup)TestPigStats.getLogicalPlan(pigServer).findByAlias("b");
90 assertTrue(op.isPinnedOption(LOCogroup.OPTION_GROUPTYPE));
91 pigServer.discardBatch();
92 }
93}

Callers

nothing calls this directly

Calls 6

getLogicalPlanMethod · 0.95
findByAliasMethod · 0.80
isPinnedOptionMethod · 0.80
setBatchOnMethod · 0.45
registerQueryMethod · 0.45
discardBatchMethod · 0.45

Tested by

no test coverage detected