You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by pi song <pi...@gmail.com> on 2008/07/24 14:13:15 UTC

EvalFunc semantic?

Currently there are two ways to return type information in EvalFunc.

Type getReturnType()
Schema outputSchema(Schema input)

Does anyone really understand why we need both of them ?

Seems like there can be two things:-
1) getReturnType() is a deprecated one. Then we should mark it as
@deprecated.
2) getReturnType() is for returning the actual type. outputSchema() is for
returning schema of complex type only in case that getReturnType() happens
to return a complex type. This, however, poses a problem that in
getReturnType() refers to Java types but types in outputSchema() are our
types in DataType class.

Pi