Author: olga
Date: Wed Nov 12 17:00:00 2008
New Revision: 713595

URL: http://svn.apache.org/viewvc?rev=713595&view=rev
Log:
added lookup table for UPPER function

Modified:
    
hadoop/pig/branches/types/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/UPPER.java

Modified: 
hadoop/pig/branches/types/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/UPPER.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/types/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/UPPER.java?rev=713595&r1=713594&r2=713595&view=diff
==============================================================================
--- 
hadoop/pig/branches/types/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/UPPER.java
 (original)
+++ 
hadoop/pig/branches/types/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/UPPER.java
 Wed Nov 12 17:00:00 2008
@@ -19,11 +19,16 @@
 package org.apache.pig.piggybank.evaluation.string;
 
 import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
 
 import org.apache.pig.EvalFunc;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.DataType;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
+import org.apache.pig.impl.logicalLayer.FrontendException;
+import org.apache.pig.FuncSpec;
+
 
 /**
  * string.UPPER implements eval function to convert a string to upper case
@@ -63,4 +68,16 @@
     public Schema outputSchema(Schema input) {
         return new Schema(new 
Schema.FieldSchema(getSchemaName(this.getClass().getName().toLowerCase(), 
input), DataType.CHARARRAY));
     }
+
+     /* (non-Javadoc)
+      * @see org.apache.pig.EvalFunc#getArgToFuncMapping()
+      */
+     @Override
+     public List<FuncSpec> getArgToFuncMapping() throws FrontendException {
+        List<FuncSpec> funcList = new ArrayList<FuncSpec>();
+        funcList.add(new FuncSpec(this.getClass().getName(), new Schema(new 
Schema.FieldSchema(null, DataType.CHARARRAY))));
+
+        return funcList;
+     }
+
 }


Reply via email to