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 2009/07/04 03:37:04 UTC
svn commit: r791048 - in /hadoop/pig/trunk: CHANGES.txt
src/org/apache/pig/builtin/BinStorage.java
Author: daijy
Date: Sat Jul 4 01:37:04 2009
New Revision: 791048
URL: http://svn.apache.org/viewvc?rev=791048&view=rev
Log:
PIG-861: POJoinPackage lose tuple in large dataset
Modified:
hadoop/pig/trunk/CHANGES.txt
hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java
Modified: hadoop/pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=791048&r1=791047&r2=791048&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Sat Jul 4 01:37:04 2009
@@ -40,6 +40,8 @@
BUG FIXES
+ PIG-861: POJoinPackage lose tuple in large dataset (daijy)
+
PIG-797: Limit with ORDER BY producing wrong results (daijy)
PIG-850: Dump produce wrong result while "store into" is ok (daijy)
Modified: hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java?rev=791048&r1=791047&r2=791048&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/builtin/BinStorage.java Sat Jul 4 01:37:04 2009
@@ -47,9 +47,9 @@
import org.apache.pig.impl.util.LogUtils;
public class BinStorage implements ReversibleLoadStoreFunc, SamplableLoader {
- public static final byte RECORD_1 = 0x01;
- public static final byte RECORD_2 = 0x02;
- public static final byte RECORD_3 = 0x03;
+ public static final int RECORD_1 = 0x01;
+ public static final int RECORD_2 = 0x02;
+ public static final int RECORD_3 = 0x03;
Iterator<Tuple> i = null;
protected BufferedPositionedInputStream in = null;
@@ -75,7 +75,7 @@
public Tuple getNext() throws IOException {
- byte b = 0;
+ int b = 0;
// skip to next record
while (true) {
if (in == null || in.getPosition() >=end) {
@@ -87,23 +87,23 @@
// After reading the second RECORD_1 in the above
// sequence, we should not look for RECORD_1 again
if(b != RECORD_1) {
- b = (byte) in.read();
+ b = in.read();
if(b != RECORD_1 && b != -1) {
continue;
}
if(b == -1) return null;
}
- b = (byte) in.read();
+ b = in.read();
if(b != RECORD_2 && b != -1) {
continue;
}
if(b == -1) return null;
- b = (byte) in.read();
+ b = in.read();
if(b != RECORD_3 && b != -1) {
continue;
}
if(b == -1) return null;
- b = (byte) in.read();
+ b = in.read();
if(b != DataType.TUPLE && b != -1) {
continue;
}