Annotation Type OutputSchema

public @interface OutputSchema

An EvalFunc can annotated with an OutputSchema to tell Pig what the expected output is. This can be used in place of EvalFunc.outputSchema(Schema)

The default implementation of EvalFunc.outputSchema(Schema) will look at this annotation and return an interpreted schema, if the annotation is present.

Implementing a custom EvalFunc.outputSchema(Schema) will override the annotation (unless you deal with it explicitly, or by calling super.outputSchema(schema)).

Here's an example of a complex schema declared in an annotation: @OutputSchema("y:bag{t:tuple(len:int,word:chararray)}")

Required Element Summary
 String value

Element Detail


public abstract String value

Copyright © 2007-2012 The Apache Software Foundation