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

Method testSplitNondeterministic

test/org/apache/pig/test/TestSplit.java:139–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137 }
138
139 @Test(expected=FrontendException.class)
140 public void testSplitNondeterministic() throws IOException {
141 String query =
142 "a = load 'input' using mock.Storage() as (id:int);" +
143 "split a into b if RANDOM() < 0.5, d otherwise;"
144 ;
145
146 try {
147 Util.registerMultiLineQuery(pig, query);
148 } catch (FrontendException fe) {
149 Util.checkMessageInException(fe,
150 "Can not use Otherwise in Split with an expression containing a @Nondeterministic UDF");
151 throw fe;
152 }
153
154 }
155}
156

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected