cast.setFieldSchema(fs);
p.add(cast);
p.connect(proj, cast);
cast.setFieldSchema(fs.clone());
FuncSpec loadFuncSpec = null;
if(lo instanceof LOLoad) {
loadFuncSpec = ((LOLoad)lo).getInputFile().getFuncSpec();
} else if (lo instanceof LOStream) {
StreamingCommand command = ((LOStream)lo).getStreamingCommand();
HandleSpec streamOutputSpec = command.getOutputSpec();
loadFuncSpec = new FuncSpec(streamOutputSpec.getSpec());
} else {
int errCode = 2006;
String msg = "TypeCastInserter invoked with an invalid operator class name: " + lo.getClass().getSimpleName();
throw new OptimizerException(msg, errCode, PigException.BUG);
}