pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r594348 - in /incubator/pig/trunk: src/org/apache/pig/data/BigDataBag.java test/org/apache/pig/test/TestDataModel.java
Date Mon, 12 Nov 2007 23:46:39 GMT
Author: breed
Date: Mon Nov 12 15:46:36 2007
New Revision: 594348

URL: http://svn.apache.org/viewvc?rev=594348&view=rev
Log:
Fixed PIG-26: distinct not working on bags that have spilled to disk

Modified:
    incubator/pig/trunk/src/org/apache/pig/data/BigDataBag.java
    incubator/pig/trunk/test/org/apache/pig/test/TestDataModel.java

Modified: incubator/pig/trunk/src/org/apache/pig/data/BigDataBag.java
URL: http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/data/BigDataBag.java?rev=594348&r1=594347&r2=594348&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/data/BigDataBag.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/data/BigDataBag.java Mon Nov 12 15:46:36 2007
@@ -399,7 +399,7 @@
     
     @Override
 	public void distinct() {
-    	sort(null,true);
+    	sort(new StarSpec(),true);
     	isSorted = true;
     }
 

Modified: incubator/pig/trunk/test/org/apache/pig/test/TestDataModel.java
URL: http://svn.apache.org/viewvc/incubator/pig/trunk/test/org/apache/pig/test/TestDataModel.java?rev=594348&r1=594347&r2=594348&view=diff
==============================================================================
--- incubator/pig/trunk/test/org/apache/pig/test/TestDataModel.java (original)
+++ incubator/pig/trunk/test/org/apache/pig/test/TestDataModel.java Mon Nov 12 15:46:36 2007
@@ -204,7 +204,7 @@
 
     public void testBigDataBagOnDisk() throws Exception{
     	Runtime.getRuntime().gc();
-    	//testBigDataBag(Runtime.getRuntime().maxMemory() - 1*1024*1024, 10000);
+    	testBigDataBag(Runtime.getRuntime().maxMemory() - 1*1024*1024, 10000);
     }
 
     
@@ -247,6 +247,8 @@
         
         assertTrue(bag.cardinality() == count);
         
+        bag.distinct();
+
         bag.clear();
 
         //Test pre sort



Mime
View raw message