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

Method fillWithData

test/org/apache/pig/data/TestSchemaTuple.java:398–413  ·  view source on GitHub ↗
(SchemaTuple<?> st)

Source from the content-addressed store, hash-verified

396 }
397
398 private void fillWithData(SchemaTuple<?> st) throws ExecException {
399 Schema udfSchema = st.getSchema();
400 int pos = 0;
401 for (FieldSchema fs : udfSchema.getFields()) {
402 Object val;
403 if (fs.type == DataType.TUPLE) {
404 val = SchemaTupleFactory
405 .getInstance(fs.schema, false, GenContext.FORCE_LOAD)
406 .newTuple();
407 fillWithData((SchemaTuple<?>)val);
408 } else {
409 val = randData(fs);
410 }
411 st.set(pos++, val);
412 }
413 }
414
415 private Random r = new Random(100L);
416

Callers 3

copyThenCompareMethod · 0.95
testInterStorageSerDeMethod · 0.95
testSerDeMethod · 0.95

Calls 6

getFieldsMethod · 0.95
getInstanceMethod · 0.95
randDataMethod · 0.95
getSchemaMethod · 0.65
newTupleMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected