@Nondeterministic public class RandInt extends SimpleEvalFunc<java.lang.Integer>
Constructor and Description |
---|
RandInt() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
call(java.lang.Integer min,
java.lang.Integer max) |
org.apache.pig.impl.logicalLayer.schema.Schema |
outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input)
Override outputSchema so we can verify the input schema at pig compile time, instead of runtime
|
exec, getReturnType
getContextProperties, getInstanceName, getInstanceProperties, onReady, setUDFContextSignature
public java.lang.Integer call(java.lang.Integer min, java.lang.Integer max) throws java.io.IOException
min
- lower bound for random numbermax
- upper bound for random numberjava.io.IOException
- IOExceptionpublic org.apache.pig.impl.logicalLayer.schema.Schema outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema input)
SimpleEvalFunc
outputSchema
in class SimpleEvalFunc<java.lang.Integer>
input
- input schema