You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2013/06/24 23:50:12 UTC

svn commit: r1496231 - in /pig/trunk: CHANGES.txt src/docs/src/documentation/content/xdocs/udf.xml

Author: daijy
Date: Mon Jun 24 21:50:11 2013
New Revision: 1496231

URL: http://svn.apache.org/r1496231
Log:
PIG-3354: UDF example does not handle nulls

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/src/docs/src/documentation/content/xdocs/udf.xml

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1496231&r1=1496230&r2=1496231&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Mon Jun 24 21:50:11 2013
@@ -196,6 +196,8 @@ PIG-3013: BinInterSedes improve chararra
 
 BUG FIXES
 
+PIG-3354: UDF example does not handle nulls (patc888 via daijy)
+
 PIG-3355: ColumnMapKeyPrune bug with distinct operator (jeremykarn via aniket486)
 
 PIG-3318: AVRO: 'default value' not honored when merging schemas on load with AvroStorage (viraj via rohini)

Modified: pig/trunk/src/docs/src/documentation/content/xdocs/udf.xml
URL: http://svn.apache.org/viewvc/pig/trunk/src/docs/src/documentation/content/xdocs/udf.xml?rev=1496231&r1=1496230&r2=1496231&view=diff
==============================================================================
--- pig/trunk/src/docs/src/documentation/content/xdocs/udf.xml (original)
+++ pig/trunk/src/docs/src/documentation/content/xdocs/udf.xml Mon Jun 24 21:50:11 2013
@@ -112,7 +112,7 @@ transformation functions and include agg
 6  public class UPPER extends EvalFunc<String>
 7  {
 8    public String exec(Tuple input) throws IOException {
-9        if (input == null || input.size() == 0)
+9        if (input == null || input.size() == 0 || input.get(0) == null)
 10            return null;
 11        try{
 12            String str = (String)input.get(0);