Repository: cassandra Updated Branches: refs/heads/trunk 62f20789b -> 99fc7d9ce
Fix multiget_slice patch by Benjamin Lerer; reviewed by Stefania Alborghetti and Sylvain Lebresne for CASSANDRA-9906 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/706ba876 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/706ba876 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/706ba876 Branch: refs/heads/trunk Commit: 706ba8767e7339e0af5eebf84cc61bc21883f6e0 Parents: 29d3d44 Author: blerer <[email protected]> Authored: Mon Aug 24 14:38:15 2015 +0200 Committer: blerer <[email protected]> Committed: Mon Aug 24 14:38:15 2015 +0200 ---------------------------------------------------------------------- .../apache/cassandra/thrift/CassandraServer.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/706ba876/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 fd391aa..e827e95 100644 --- a/src/java/org/apache/cassandra/thrift/CassandraServer.java +++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java @@ -30,9 +30,12 @@ import java.util.zip.Inflater; import com.google.common.base.Joiner; import com.google.common.collect.*; import com.google.common.primitives.Longs; + +import org.apache.cassandra.config.ColumnDefinition; +import org.apache.cassandra.db.filter.ColumnFilter; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; - import org.apache.cassandra.auth.Permission; import org.apache.cassandra.config.*; import org.apache.cassandra.cql3.QueryOptions; @@ -399,8 +402,13 @@ public class CassandraServer implements Cassandra.Iface for (ByteBuffer bb : predicate.column_names) { LegacyLayout.LegacyCellName name = LegacyLayout.decodeCellName(metadata, parent.bufferForSuper_column(), bb); - clusterings.add(name.clustering); + + if (!name.clustering.equals(Clustering.STATIC_CLUSTERING)) + clusterings.add(name.clustering); } + + // clusterings cannot include STATIC_CLUSTERING, so if the names filter is for static columns, clusterings + // will be empty. However, by requesting the static columns in our ColumnFilter, this will still work. return new ClusteringIndexNamesFilter(clusterings, false); } } @@ -492,12 +500,16 @@ public class CassandraServer implements Cassandra.Iface } else { - PartitionColumns.Builder builder = new PartitionColumns.Builder(); + PartitionColumns.Builder builder = PartitionColumns.builder(); for (ByteBuffer bb : predicate.column_names) { LegacyLayout.LegacyCellName name = LegacyLayout.decodeCellName(metadata, parent.bufferForSuper_column(), bb); builder.add(name.column); } + + if (metadata.isStaticCompactTable()) + builder.add(metadata.compactValueColumn()); + return ColumnFilter.selection(builder.build()); } }
