Author: gdusbabek
Date: Tue Jan 18 18:07:19 2011
New Revision: 1060494

URL: http://svn.apache.org/viewvc?rev=1060494&view=rev
Log:
use the writer schema and not the current schema when deserializing. patch by 
gdusbabek, reviewed by eevans. CASSANDRA-2001

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/io/SerDeUtils.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/io/SerDeUtils.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/io/SerDeUtils.java?rev=1060494&r1=1060493&r2=1060494&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/io/SerDeUtils.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/io/SerDeUtils.java Tue Jan 18 
18:07:19 2011
@@ -64,7 +64,8 @@ public final class SerDeUtils
     {
         BinaryDecoder dec = 
DIRECT_DECODERS.createBinaryDecoder(ByteBufferUtil.getArray(bytes), null);
         SpecificDatumReader<T> reader = new SpecificDatumReader<T>(writer);
-        reader.setExpected(ob.getSchema());
+        // we're expecting to see the schema of the writer, not the current 
schema, aka ob.getSchema().
+        reader.setExpected(writer);
         return reader.read(ob, dec);
     }
 


Reply via email to