cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ble...@apache.org
Subject [2/2] cassandra git commit: Merge cassandra-2.2 into cassandra-3.0
Date Mon, 17 Aug 2015 09:12:44 GMT
Merge cassandra-2.2 into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: 47b66d7c1e22dfd063d39b6aa3874c611ef8f0b7
Parents: d2da760 ee186b6
Author: blerer <benjamin.lerer@datastax.com>
Authored: Mon Aug 17 11:09:51 2015 +0200
Committer: blerer <benjamin.lerer@datastax.com>
Committed: Mon Aug 17 11:10:55 2015 +0200

----------------------------------------------------------------------
 .../restrictions/PrimaryKeyRestrictionSet.java  |  2 +-
 .../cql3/statements/SelectStatement.java        |  2 +
 .../operations/SelectOrderByTest.java           | 43 ++++++++++++++++++++
 3 files changed, 46 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/47b66d7c/src/java/org/apache/cassandra/cql3/restrictions/PrimaryKeyRestrictionSet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/47b66d7c/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 32177a4,3edb7d0..9acbb35
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -747,8 -811,11 +747,10 @@@ public class SelectStatement implement
                  verifyOrderingIsAllowed(restrictions);
                  orderingComparator = getOrderingComparator(cfm, selection, restrictions);
                  isReversed = isReversed(cfm);
++                if (isReversed)
++                    orderingComparator = Collections.reverseOrder(orderingComparator);
              }
  
 -            if (isReversed)
 -                restrictions.reverse();
 -
              checkNeedsFiltering(restrictions);
  
              SelectStatement stmt = new SelectStatement(cfm,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/47b66d7c/test/unit/org/apache/cassandra/cql3/validation/operations/SelectOrderByTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/cql3/validation/operations/SelectOrderByTest.java
index e788095,699ade8..341eed9
--- a/test/unit/org/apache/cassandra/cql3/validation/operations/SelectOrderByTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/operations/SelectOrderByTest.java
@@@ -21,7 -21,8 +21,8 @@@ import org.junit.Test
  
  import org.apache.cassandra.cql3.CQLTester;
  
 -import static org.junit.Assert.assertTrue;
+ import static java.util.Arrays.asList;
 +import static org.junit.Assert.assertTrue;
  
  public class SelectOrderByTest extends CQLTester
  {


Mime
View raw message