Found this little gem in the tests:
private Schema parseSchema(String schemaString)
throws ParseException {
ByteArrayInputStream stream = new
ByteArrayInputStream(schemaString.getBytes()) ;
QueryParser parser = new QueryParser(stream) ;
return parser.TupleSchema() ;
}
Was hoping to use this in a udf to pass in a schema like:
com.mystuff.MyUdf('id:int, name:chararray')
When I use QueryParser from my unit tests it works when I it up in a pig script
parser.TupleSchema() returns null. Anyway I can get this to work?