Updated Branches:
  refs/heads/trunk 1a44fa7ea -> 6ce498f5a

Use binary collection encoding for Thrift resultsets
patch by slebresne; reviewed by Paul Cannon for CASSANDRA-4453


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6ce498f5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6ce498f5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6ce498f5

Branch: refs/heads/trunk
Commit: 6ce498f5ad5879fdc58dc0c92af6cc52002fd198
Parents: ba231f4
Author: Jonathan Ellis <[email protected]>
Authored: Tue Aug 14 16:52:02 2012 -0500
Committer: Jonathan Ellis <[email protected]>
Committed: Tue Aug 14 16:52:02 2012 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cql3/ResultSet.java |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6ce498f5/src/java/org/apache/cassandra/cql3/ResultSet.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/ResultSet.java 
b/src/java/org/apache/cassandra/cql3/ResultSet.java
index 152edb9..c6a93e6 100644
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@ -112,7 +112,7 @@ public class ResultSet
         {
             ByteBuffer colName = ByteBufferUtil.bytes(name.toString());
             schema.name_types.put(colName, UTF8);
-            schema.value_types.put(colName, 
TypeParser.getShortName(name.type));
+            schema.value_types.put(colName, name.type.toString());
         }
 
         List<CqlRow> cqlRows = new ArrayList<CqlRow>(rows.size());
@@ -122,10 +122,7 @@ public class ResultSet
             for (int i = 0; i < metadata.names.size(); i++)
             {
                 Column col = new 
Column(ByteBufferUtil.bytes(metadata.names.get(i).toString()));
-                if (row.get(i) != null && 
metadata.names.get(i).type.isCollection())
-                    
col.setValue(ByteBufferUtil.bytes(FBUtilities.json(metadata.names.get(i).type.compose(row.get(i)))));
-                else
-                    col.setValue(row.get(i));
+                col.setValue(row.get(i));
                 thriftCols.add(col);
             }
             // The key of CqlRow shoudn't be needed in CQL3

Reply via email to