Author: daijy
Date: Fri Feb 12 20:02:45 2010
New Revision: 909584

URL: http://svn.apache.org/viewvc?rev=909584&view=rev
Log:
PIG-1231: Default DataBagIterator.hasNext() should be idempotent in all cases

Modified:
    hadoop/pig/trunk/src/org/apache/pig/data/DefaultDataBag.java

Modified: hadoop/pig/trunk/src/org/apache/pig/data/DefaultDataBag.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/data/DefaultDataBag.java?rev=909584&r1=909583&r2=909584&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/data/DefaultDataBag.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/data/DefaultDataBag.java Fri Feb 12 
20:02:45 2010
@@ -50,8 +50,6 @@
 
     private static final Log log = LogFactory.getLog(DefaultDataBag.class);
     
-    boolean hasCachedTuple = false;
-    
     public DefaultDataBag() {
         mContents = new ArrayList<Tuple>();
     }
@@ -76,7 +74,6 @@
     }
     
     public Iterator<Tuple> iterator() {
-        hasCachedTuple = false;
         return new DefaultDataBagIterator();
     }
 
@@ -148,6 +145,7 @@
         private int mFilePtr = 0;
         private DataInputStream mIn = null;
         private int mCntr = 0;
+        private boolean hasCachedTuple = false;
 
         DefaultDataBagIterator() {
         }


Reply via email to