/** * Create a new tuple schema according one list: types of fields, the * default names of fields are f0,f1,f2..., and the tuple name is t. * * @param dataTypes * @return tuple schema * @throws FrontendException */ public static Schema newTupleSchema(List<Byte> dataTypes) throws FrontendException { List<String> names = newNames(dataTypes.size()); return newTupleSchema("t", names, dataTypes); }
/** * Create a new tuple schema according one list: types of fields, the * default names of fields are f0,f1,f2..., and the tuple is t, the bag name * is b. * * @param dataTypes * @return bag schema * @throws FrontendException */ public static Schema newBagSchema(List<Byte> dataTypes) throws FrontendException { List<String> names = newNames(dataTypes.size()); return newBagSchema(names, dataTypes); }