org.apache.pig.piggybank.evaluation.string
Class LOWER

java.lang.Object
  extended by org.apache.pig.EvalFunc<String>
      extended by org.apache.pig.piggybank.evaluation.string.LOWER

public class LOWER
extends EvalFunc<String>

string.LOWER implements eval function to convert a string to lower case Example: register pigudfs.jar; A = load 'mydata' as (name); B = foreach A generate string.LOWER(name); dump B;


Field Summary
 
Fields inherited from class org.apache.pig.EvalFunc
log, pigLogger, reporter, returnType
 
Constructor Summary
LOWER()
           
 
Method Summary
 String exec(Tuple input)
          Method invoked on every tuple during foreach evaluation
 List<FuncSpec> getArgToFuncMapping()
           
 Schema outputSchema(Schema input)
          This method gives a name to the column.
 
Methods inherited from class org.apache.pig.EvalFunc
finish, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, isAsynchronous, progress, setPigLogger, setReporter, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LOWER

public LOWER()
Method Detail

exec

public String exec(Tuple input)
            throws IOException
Method invoked on every tuple during foreach evaluation

Specified by:
exec in class EvalFunc<String>
Parameters:
input - tuple; first column is assumed to have the column to convert
Returns:
result, of type T.
Throws:
IOException

outputSchema

public Schema outputSchema(Schema input)
This method gives a name to the column.

Overrides:
outputSchema in class EvalFunc<String>
Parameters:
input - - schema of the input data
Returns:
schema of the input data

getArgToFuncMapping

public List<FuncSpec> getArgToFuncMapping()
                                   throws FrontendException
Overrides:
getArgToFuncMapping in class EvalFunc<String>
Returns:
A List containing FuncSpec objects representing the Function class which can handle the inputs corresponding to the schema in the objects
Throws:
FrontendException


Copyright © ${year} The Apache Software Foundation