Updated Branches: refs/heads/trunk e674abe8e -> 694988015
Fix ClassCastException for super columns Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/69498801 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/69498801 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/69498801 Branch: refs/heads/trunk Commit: 694988015f67685dc2decaf950153f557f7f598f Parents: e674abe Author: Sylvain Lebresne <[email protected]> Authored: Mon Jan 6 09:42:48 2014 +0100 Committer: Sylvain Lebresne <[email protected]> Committed: Mon Jan 6 09:42:48 2014 +0100 ---------------------------------------------------------------------- src/java/org/apache/cassandra/thrift/CassandraServer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/69498801/src/java/org/apache/cassandra/thrift/CassandraServer.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java b/src/java/org/apache/cassandra/thrift/CassandraServer.java index e91bea2..5859f92 100644 --- a/src/java/org/apache/cassandra/thrift/CassandraServer.java +++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java @@ -474,10 +474,10 @@ public class CassandraServer implements Cassandra.Iface IDiskAtomFilter filter; if (metadata.isSuper()) { - CellNameType type = metadata.comparator; - SortedSet names = new TreeSet<ByteBuffer>(column_path.column == null ? type.subtype(0) : type.subtype(1)); - names.add(column_path.column == null ? column_path.super_column : column_path.column); - filter = SuperColumns.fromSCNamesFilter(type, column_path.column == null ? null : column_path.bufferForSuper_column(), new NamesQueryFilter(names)); + CellNameType columnType = new SimpleDenseCellNameType(metadata.comparator.subtype(column_path.column == null ? 0 : 1)); + SortedSet<CellName> names = new TreeSet<CellName>(columnType); + names.add(columnType.cellFromByteBuffer(column_path.column == null ? column_path.super_column : column_path.column)); + filter = SuperColumns.fromSCNamesFilter(metadata.comparator, column_path.column == null ? null : column_path.bufferForSuper_column(), new NamesQueryFilter(names)); } else {
