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

Method testSampleScalarException

test/org/apache/pig/test/TestSample.java:136–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134 }
135
136 @Test(expected=FrontendException.class)
137 public void testSampleScalarException() throws IOException {
138 String query =
139 "a = load '" + Util.encodeEscape(tmpfilepath) + "';" +
140 "b = sample a $0;" // reference to non scalar context is not allowed
141 ;
142
143 Util.registerMultiLineQuery(pig, query);
144 try {
145 pig.openIterator("b");
146 } catch (FrontendException fe) {
147 Util.checkMessageInException(fe, ScalarVariableValidator.ERR_MSG_SCALAR);
148 throw fe;
149 }
150 }
151}

Callers

nothing calls this directly

Calls 4

encodeEscapeMethod · 0.95
openIteratorMethod · 0.80

Tested by

no test coverage detected