cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r777583 - in /incubator/cassandra/trunk/src/java/org/apache/cassandra/db: CountFilter.java NamesFilter.java RangeFilter.java TimeFilter.java
Date Fri, 22 May 2009 15:37:20 GMT
Author: jbellis
Date: Fri May 22 15:37:19 2009
New Revision: 777583

URL: http://svn.apache.org/viewvc?rev=777583&view=rev
Log:
use cloneMeShallow where appropriate.  patch by jbellis for CASSANDRA-79

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CountFilter.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/NamesFilter.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RangeFilter.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/TimeFilter.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CountFilter.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CountFilter.java?rev=777583&r1=777582&r2=777583&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CountFilter.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CountFilter.java Fri May 22
15:37:19 2009
@@ -55,9 +55,9 @@
 	{
     	String[] values = RowMutation.getColumnAndColumnFamily(cfNameParam);
         if ( columnFamily == null )
-            return columnFamily;
+            return null;
 
-        ColumnFamily filteredCf = new ColumnFamily(columnFamily.name(), columnFamily.type());
+        ColumnFamily filteredCf = columnFamily.cloneMeShallow();
 		if( countLimit_ <= 0 )
 		{
 			isDone_ = true;

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/NamesFilter.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/NamesFilter.java?rev=777583&r1=777582&r2=777583&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/NamesFilter.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/NamesFilter.java Fri May 22
15:37:19 2009
@@ -43,10 +43,10 @@
     {
         if ( columnFamily == null )
         {
-            return columnFamily;
+            return null;
         }
     	String[] values = RowMutation.getColumnAndColumnFamily(cf);
-        ColumnFamily filteredCf = new ColumnFamily(columnFamily.name(), columnFamily.type());
+        ColumnFamily filteredCf = columnFamily.cloneMeShallow();
 		if( values.length == 1 )
 		{
 			Collection<IColumn> columns = columnFamily.getAllColumns();

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RangeFilter.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RangeFilter.java?rev=777583&r1=777582&r2=777583&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RangeFilter.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RangeFilter.java Fri May 22
15:37:19 2009
@@ -63,7 +63,7 @@
             return null;
         }
 
-        ColumnFamily filteredColumnFamily = new ColumnFamily(cfName, cf.type());
+        ColumnFamily filteredColumnFamily = cf.cloneMeShallow();
 
         Collection<IColumn> columns = cf.getAllColumns();
         for (IColumn c : columns)

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/TimeFilter.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/TimeFilter.java?rev=777583&r1=777582&r2=777583&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/TimeFilter.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/TimeFilter.java Fri May 22
15:37:19 2009
@@ -48,10 +48,10 @@
 	public ColumnFamily filter(String cf, ColumnFamily columnFamily)
 	{
     	if (columnFamily == null)
-    		return columnFamily;
+    		return null;
 
         String[] values = RowMutation.getColumnAndColumnFamily(cf);
-        ColumnFamily filteredCf = new ColumnFamily(columnFamily.name(), columnFamily.type());
+        ColumnFamily filteredCf = columnFamily.cloneMeShallow();
 		if (values.length == 1 && !columnFamily.isSuper())
 		{
     		Collection<IColumn> columns = columnFamily.getAllColumns();



Mime
View raw message