Author: rohini
Date: Fri May 22 17:40:10 2015
New Revision: 1681166

URL: http://svn.apache.org/r1681166
Log:
PIG-4525: Clarify Scalar has more than one row in the output

Modified:
    pig/branches/branch-0.15/CHANGES.txt
    
pig/branches/branch-0.15/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java
    pig/branches/branch-0.15/src/org/apache/pig/impl/builtin/ReadScalars.java

Modified: pig/branches/branch-0.15/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/pig/branches/branch-0.15/CHANGES.txt?rev=1681166&r1=1681165&r2=1681166&view=diff
==============================================================================
--- pig/branches/branch-0.15/CHANGES.txt (original)
+++ pig/branches/branch-0.15/CHANGES.txt Fri May 22 17:40:10 2015
@@ -26,6 +26,8 @@ IMPROVEMENTS
 
 PIG-4563: Upgrade to released Tez 0.7.0 (daijy)
 
+PIG-4525: Clarify "Scalar has more than one row in the output." (Niels Basjes 
via gates)
+
 PIG-4511: Add columns to prune from PluckTuple (jbabcock via cheolsoo)
 
 PIG-4434: Improve auto-parallelism for tez (daijy)

Modified: 
pig/branches/branch-0.15/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java
URL: 
http://svn.apache.org/viewvc/pig/branches/branch-0.15/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java?rev=1681166&r1=1681165&r2=1681166&view=diff
==============================================================================
--- 
pig/branches/branch-0.15/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java
 (original)
+++ 
pig/branches/branch-0.15/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java
 Fri May 22 17:40:10 2015
@@ -84,7 +84,8 @@ public class ReadScalarsTez extends Eval
                 if (reader.next()) {
                     String msg = "Scalar has more than one row in the output. "
                             + "1st : " + first + ", 2nd :"
-                            + reader.getCurrentValue();
+                            + reader.getCurrentValue()
+                            + " (common cause: \"JOIN\" then \"FOREACH ... 
GENERATE foo.bar\" should be \"foo::bar\" )";
                     throw new ExecException(msg);
                 }
             } else {

Modified: 
pig/branches/branch-0.15/src/org/apache/pig/impl/builtin/ReadScalars.java
URL: 
http://svn.apache.org/viewvc/pig/branches/branch-0.15/src/org/apache/pig/impl/builtin/ReadScalars.java?rev=1681166&r1=1681165&r2=1681166&view=diff
==============================================================================
--- pig/branches/branch-0.15/src/org/apache/pig/impl/builtin/ReadScalars.java 
(original)
+++ pig/branches/branch-0.15/src/org/apache/pig/impl/builtin/ReadScalars.java 
Fri May 22 17:40:10 2015
@@ -74,7 +74,8 @@ public class ReadScalars extends EvalFun
                     valueLoaded = true;
                     return null;
                 } else if (inputBag.size() > 1) {
-                    String msg = "Scalar has more than one row in the output.";
+                    String msg = "Scalar has more than one row in the output."
+                            +" (common cause: \"JOIN\" then \"FOREACH ... 
GENERATE foo.bar\" should be \"foo::bar\" )";
                     throw new ExecException(msg);
                 }
                 Tuple t1 = inputBag.iterator().next();
@@ -111,7 +112,8 @@ public class ReadScalars extends EvalFun
                 Tuple t2 = loader.getNext();
                 if(t2 != null){
                     String msg = "Scalar has more than one row in the output. "
-                        + "1st : " + t1 + ", 2nd :" + t2;
+                        + "1st : " + t1 + ", 2nd :" + t2
+                        +" (common cause: \"JOIN\" then \"FOREACH ... GENERATE 
foo.bar\" should be \"foo::bar\" )";
                     throw new ExecException(msg);
                 }
                 valueLoaded = true;


Reply via email to