cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject [3/3] cassandra git commit: Merge branch 'cassandra-2.1' into trunk
Date Fri, 09 Jan 2015 17:22:47 GMT
Merge branch 'cassandra-2.1' into trunk

Conflicts:
	src/java/org/apache/cassandra/cql3/statements/SelectStatement.java


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

Branch: refs/heads/trunk
Commit: 1657b4fbf9d7eae1b7a1d829de882d2a86ae14c8
Parents: d1a552d 7f62e29
Author: Tyler Hobbs <tyler@datastax.com>
Authored: Fri Jan 9 11:22:33 2015 -0600
Committer: Tyler Hobbs <tyler@datastax.com>
Committed: Fri Jan 9 11:22:33 2015 -0600

----------------------------------------------------------------------
 CHANGES.txt                                          |  2 ++
 .../cassandra/cql3/statements/SelectStatement.java   |  6 +++++-
 .../apache/cassandra/db/AbstractRangeCommand.java    | 13 +++++++++++++
 .../org/apache/cassandra/db/ColumnFamilyStore.java   |  4 +++-
 src/java/org/apache/cassandra/db/DataRange.java      | 12 ++++++++++++
 .../apache/cassandra/db/filter/ExtendedFilter.java   |  6 ++++++
 .../apache/cassandra/db/filter/SliceQueryFilter.java |  6 ++++++
 .../org/apache/cassandra/service/StorageProxy.java   | 15 ++++++++-------
 8 files changed, 55 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1657b4fb/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1657b4fb/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index f06055a,92a9579..de8e004
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -348,12 -432,16 +348,16 @@@ public class SelectStatement implement
              // For distinct, we only care about fetching the beginning of each partition.
If we don't have
              // static columns, we in fact only care about the first cell, so we query only
that (we don't "group").
              // If we do have static columns, we do need to fetch the first full group (to
have the static columns values).
-             return new SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY, false, 1, selection.containsStaticColumns()
? toGroup : -1);
+ 
+             // See the comments on IGNORE_TOMBSTONED_PARTITIONS and CASSANDRA-8490 for why
we use a special value for
+             // DISTINCT queries on the partition key only.
 -            toGroup = selectsStaticColumns ? toGroup : SliceQueryFilter.IGNORE_TOMBSTONED_PARTITIONS;
++            toGroup = selection.containsStaticColumns() ? toGroup : SliceQueryFilter.IGNORE_TOMBSTONED_PARTITIONS;
+             return new SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY, false, 1, toGroup);
          }
 -        else if (isColumnRange())
 +        else if (restrictions.isColumnRange())
          {
 -            List<Composite> startBounds = getRequestedBound(Bound.START, options);
 -            List<Composite> endBounds = getRequestedBound(Bound.END, options);
 +            List<Composite> startBounds = restrictions.getClusteringColumnsBoundsAsComposites(Bound.START,
options);
 +            List<Composite> endBounds = restrictions.getClusteringColumnsBoundsAsComposites(Bound.END,
options);
              assert startBounds.size() == endBounds.size();
  
              // Handles fetching static columns. Note that for 2i, the filter is just used
to restrict

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1657b4fb/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1657b4fb/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1657b4fb/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1657b4fb/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------


Mime
View raw message