public List<FuncSpec> getArgToFuncMapping() throws FrontendException {
List<FuncSpec> funcList = new ArrayList<FuncSpec>();
// the following schema should match when the input is
// just a {bytearray} - exact match
funcList.add(new FuncSpec(this.getClass().getName(),
new Schema(new Schema.FieldSchema(null, DataType.BYTEARRAY))));
// the following schema should match when the input is
// just a {int} - exact match
funcList.add(new FuncSpec(this.getClass().getName(),
new Schema(new Schema.FieldSchema(null, DataType.INTEGER))));
// The following two schemas will cause conflict when input schema
// is {float, bytearray} since bytearray can be casted either to long
// or double. However when input schema is {bytearray, int}, it should work
// since bytearray should get casted to float and int to long. Likewise if
// input schema is {bytearray, long} or {bytearray, double} it should work
funcList.add(new FuncSpec(this.getClass().getName(),
new Schema(Arrays.asList(new Schema.FieldSchema(null, DataType.FLOAT),
new Schema.FieldSchema(null, DataType.DOUBLE)))));
funcList.add(new FuncSpec(this.getClass().getName(),
new Schema(Arrays.asList(new Schema.FieldSchema(null, DataType.FLOAT),
new Schema.FieldSchema(null, DataType.LONG)))));
// The following two schemas will cause conflict when input schema is
// {bytearray, int, int} since the two ints could be casted to long, double
// or double, long. Likewise input schema of either {bytearray, long, long}
// or {bytearray, double, double} would cause conflict. Input schema of
// {bytearray, long, double} or {bytearray, double, long} should not cause
// conflict since only the bytearray needs to be casted to float. Input schema
// of {float, bytearray, long} or {float, long, bytearray} should also
// work since only the bytearray needs to be casted. Input schema of
// {float, bytearray, int} will cause conflict since we could cast int to
// long or double and bytearray to long or double. Input schema of
// {bytearray, long, int} should work and should match the first schema below for
// matching wherein the bytearray is cast to float and the int to double.
funcList.add(new FuncSpec(this.getClass().getName(),
new Schema(Arrays.asList(new Schema.FieldSchema(null, DataType.FLOAT),
new Schema.FieldSchema(null, DataType.DOUBLE),
new Schema.FieldSchema(null, DataType.LONG)))));
funcList.add(new FuncSpec(this.getClass().getName(),
new Schema(Arrays.asList(new Schema.FieldSchema(null, DataType.FLOAT),
new Schema.FieldSchema(null, DataType.LONG),
new Schema.FieldSchema(null, DataType.DOUBLE)))));
return funcList;