// Create an Avro output schema for this node, specifying all the fields
// we can emit. Use our internal symbol (mSymbols a.k.a. outTable) to
// create more precise TypedFields that use the proper avro names.
List<TypedField> outFields = new ArrayList<TypedField>();
for (String fieldName : fieldNames) {
AssignedSymbol sym = (AssignedSymbol) outTable.resolve(fieldName).resolveAliases();
outFields.add(new TypedField(fieldName, sym.getType(), sym.getAssignedName(), fieldName));
}
PlanNode node = new NamedSourceNode(mSourceName, outFields);
planContext.getFlowSpec().addRoot(node);