cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r1085052 - /cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
Date Thu, 24 Mar 2011 17:52:19 GMT
Author: eevans
Date: Thu Mar 24 17:52:19 2011
New Revision: 1085052

URL: http://svn.apache.org/viewvc?rev=1085052&view=rev
Log:
don't needlessly validate BBs created by AT.fromString()

Patch by eevans

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java?rev=1085052&r1=1085051&r2=1085052&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java Thu Mar 24 17:52:19
2011
@@ -366,7 +366,6 @@ public class QueryProcessor
     private static void validateColumnNames(String keyspace, String columnFamily, Iterable<ByteBuffer>
columns)
     throws InvalidRequestException
     {
-        AbstractType<?> comparator = ColumnFamily.getComparatorFor(keyspace, columnFamily,
null);
         for (ByteBuffer name : columns)
         {
             if (name.remaining() > IColumn.MAX_NAME_LENGTH)
@@ -375,14 +374,6 @@ public class QueryProcessor
                                                                 IColumn.MAX_NAME_LENGTH));
             if (name.remaining() == 0)
                 throw new InvalidRequestException("zero-length column name");
-            try
-            {
-                comparator.validate(name);
-            }
-            catch (MarshalException e)
-            {
-                throw new InvalidRequestException(e.getMessage());
-            }
         }
     }
     
@@ -430,16 +421,6 @@ public class QueryProcessor
     throws InvalidRequestException
     {
         AbstractType<?> comparator = ColumnFamily.getComparatorFor(keyspace, columnFamily,
null);
-        try
-        {
-            comparator.validate(start);
-            comparator.validate(finish);
-        }
-        catch (MarshalException e)
-        {
-            throw new InvalidRequestException(e.getMessage());
-        }
-        
         Comparator<ByteBuffer> orderedComparator = reversed ? comparator.reverseComparator:
comparator;
         if (start.remaining() > 0 && finish.remaining() > 0 && orderedComparator.compare(start,
finish) > 0)
             throw new InvalidRequestException("range finish must come after start in traversal
order");



Mime
View raw message