Author: gates
Date: Fri May  1 00:14:52 2015
New Revision: 1677083

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

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

Modified: pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1677083&r1=1677082&r2=1677083&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Fri May  1 00:14:52 2015
@@ -32,6 +32,8 @@ INCOMPATIBLE CHANGES
  
 IMPROVEMENTS
 
+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/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java?rev=1677083&r1=1677082&r2=1677083&view=diff
==============================================================================
--- 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java
 (original)
+++ 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/tez/plan/udf/ReadScalarsTez.java
 Fri May  1 00:14:52 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/trunk/src/org/apache/pig/impl/builtin/ReadScalars.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/impl/builtin/ReadScalars.java?rev=1677083&r1=1677082&r2=1677083&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/impl/builtin/ReadScalars.java (original)
+++ pig/trunk/src/org/apache/pig/impl/builtin/ReadScalars.java Fri May  1 
00:14:52 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