You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ch...@apache.org on 2014/02/26 21:44:42 UTC

svn commit: r1572247 - in /pig/trunk: CHANGES.txt src/org/apache/pig/parser/LogicalPlanBuilder.java

Author: cheolsoo
Date: Wed Feb 26 20:44:42 2014
New Revision: 1572247

URL: http://svn.apache.org/r1572247
Log:
PIG-3779: Assert constructs ConstantExpression with null when no comment is given (thedatachef via cheolsoo)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1572247&r1=1572246&r2=1572247&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Wed Feb 26 20:44:42 2014
@@ -229,6 +229,8 @@ PIG-3480: TFile-based tmpfile compressio
 
 BUG FIXES
 
+PIG-3779: Assert constructs ConstantExpression with null when no comment is given (thedatachef via cheolsoo)
+
 PIG-3777: Pig 12.0 Documentation (karinahauser via daijy)
 
 PIG-3774: Piggybank Over UDF get wrong result (daijy)

Modified: pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java?rev=1572247&r1=1572246&r2=1572247&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java (original)
+++ pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java Wed Feb 26 20:44:42 2014
@@ -981,7 +981,7 @@ public class LogicalPlanBuilder {
             ConstantExpression rhs = new ConstantExpression(exprPlan, new Boolean(false));
             BinCondExpression binCond = new BinCondExpression(exprPlan, expr, lhs, rhs);
             args.add(binCond);
-            ConstantExpression constExpr = new ConstantExpression(exprPlan, comment);
+            ConstantExpression constExpr = new ConstantExpression(exprPlan, (comment == null ? "" : comment));
             args.add(constExpr);
             UserFuncExpression udf = new UserFuncExpression(exprPlan, new FuncSpec( Assert.class.getName() ), args );
             exprPlan.add(udf);