(SchemaTuple<?> st)
| 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 |