cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/2] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Date Fri, 14 Feb 2014 12:48:55 GMT
Merge branch 'cassandra-1.2' into cassandra-2.0

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/44f9c868
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44f9c868
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44f9c868

Branch: refs/heads/cassandra-2.0
Commit: 44f9c8689507b6aabeeac4943d4aff4634117b73
Parents: 78df8a3 c9ade9d
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Fri Feb 14 13:48:46 2014 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Fri Feb 14 13:48:46 2014 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../org/apache/cassandra/cql3/statements/SelectStatement.java | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/44f9c868/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 7425625,492cc2d..57eefac
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -21,33 -7,24 +21,34 @@@ Merged from 1.2
   * Log USING TTL/TIMESTAMP in a counter update warning (CASSANDRA-6649)
   * Don't exchange schema between nodes with different versions (CASSANDRA-6695)
   * Use real node messaging versions for schema exchange decisions (CASSANDRA-6700)
+  * IN on the last clustering columns + ORDER BY DESC yield no results (CASSANDRA-6701)
  
 -
 -1.2.15
 - * Move handling of migration event source to solve bootstrap race (CASSANDRA-6648)
 - * Make sure compaction throughput value doesn't overflow with int math (CASSANDRA-6647)
 -
 -
 -1.2.14
 - * Reverted code to limit CQL prepared statement cache by size (CASSANDRA-6592)
 - * add cassandra.default_messaging_version property to allow easier
 -   upgrading from 1.1 (CASSANDRA-6619)
 - * Allow executing CREATE statements multiple times (CASSANDRA-6471)
 - * Don't send confusing info with timeouts (CASSANDRA-6491)
 - * Don't resubmit counter mutation runnables internally (CASSANDRA-6427)
 - * Don't drop local mutations without a hint (CASSANDRA-6510)
 - * Don't allow null max_hint_window_in_ms (CASSANDRA-6419)
 - * Validate SliceRange start and finish lengths (CASSANDRA-6521)
 +2.0.5
 + * Reduce garbage generated by bloom filter lookups (CASSANDRA-6609)
 + * Add ks.cf names to tombstone logging (CASSANDRA-6597)
 + * Use LOCAL_QUORUM for LWT operations at LOCAL_SERIAL (CASSANDRA-6495)
 + * Wait for gossip to settle before accepting client connections (CASSANDRA-4288)
 + * Delete unfinished compaction incrementally (CASSANDRA-6086)
 + * Allow specifying custom secondary index options in CQL3 (CASSANDRA-6480)
 + * Improve replica pinning for cache efficiency in DES (CASSANDRA-6485)
 + * Fix LOCAL_SERIAL from thrift (CASSANDRA-6584)
 + * Don't special case received counts in CAS timeout exceptions (CASSANDRA-6595)
 + * Add support for 2.1 global counter shards (CASSANDRA-6505)
 + * Fix NPE when streaming connection is not yet established (CASSANDRA-6210)
 + * Avoid rare duplicate read repair triggering (CASSANDRA-6606)
 + * Fix paging discardFirst (CASSANDRA-6555)
 + * Fix ArrayIndexOutOfBoundsException in 2ndary index query (CASSANDRA-6470)
 + * Release sstables upon rebuilding 2i (CASSANDRA-6635)
 + * Add AbstractCompactionStrategy.startup() method (CASSANDRA-6637)
 + * SSTableScanner may skip rows during cleanup (CASSANDRA-6638)
 + * sstables from stalled repair sessions can resurrect deleted data (CASSANDRA-6503)
 + * Switch stress to use ITransportFactory (CASSANDRA-6641)
 + * Fix IllegalArgumentException during prepare (CASSANDRA-6592)
 + * Fix possible loss of 2ndary index entries during compaction (CASSANDRA-6517)
 + * Fix direct Memory on architectures that do not support unaligned long access
 +   (CASSANDRA-6628)
 + * Let scrub optionally skip broken counter partitions (CASSANDRA-5930)
 +Merged from 1.2:
   * fsync compression metadata (CASSANDRA-6531)
   * Validate CF existence on execution for prepared statement (CASSANDRA-6535)
   * Add ability to throttle batchlog replay (CASSANDRA-6550)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/44f9c868/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 29cafa2,e058cff..307e668
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -19,11 -19,12 +19,12 @@@ package org.apache.cassandra.cql3.state
  
  import java.nio.ByteBuffer;
  import java.util.*;
 -import java.util.concurrent.ExecutionException;
  
 +import com.google.common.base.Objects;
 +import com.google.common.base.Predicate;
  import com.google.common.collect.AbstractIterator;
 +import com.google.common.collect.Iterables;
+ import com.google.common.collect.Lists;
 -import org.slf4j.Logger;
 -import org.slf4j.LoggerFactory;
  import org.github.jamm.MemoryMeter;
  
  import org.apache.cassandra.auth.Permission;
@@@ -807,27 -711,27 +808,29 @@@ public class SelectStatement implement
  
          ColumnNameBuilder builder = cfDef.getColumnNameBuilder();
          for (int i = 0; i < columnRestrictions.length - 1; i++)
 -            builder.add(columnRestrictions[i].eqValues.get(0).bindAndGet(variables));
 +            builder.add(columnRestrictions[i].values(variables).get(0));
 +
  
 -        final List<ByteBuffer> requested = new ArrayList<ByteBuffer>(last.eqValues.size());
 -        Iterator<Term> iter = last.eqValues.iterator();
 +        List<ByteBuffer> values = last.values(variables);
 +        final List<ByteBuffer> requested = new ArrayList<ByteBuffer>(values.size());
 +        Iterator<ByteBuffer> iter = values.iterator();
          while (iter.hasNext())
          {
 -            Term t = iter.next();
 +            ByteBuffer t = iter.next();
              ColumnNameBuilder b = iter.hasNext() ? builder.copy() : builder;
 -            requested.add(b.add(t.bindAndGet(variables)).build());
 +            requested.add(b.add(t).build());
          }
  
 -        return new Iterable<IColumn>()
 +        return new Iterable<Column>()
          {
 -            public Iterator<IColumn> iterator()
 +            public Iterator<Column> iterator()
              {
 -                return new AbstractIterator<IColumn>()
 +                return new AbstractIterator<Column>()
                  {
-                     Iterator<ByteBuffer> iter = requested.iterator();
+                     // If the query is reversed, we'll reverse everything in the end, so
return the
+                     // requested in reversed order so we do return values in requested order
in the end
+                     Iterator<ByteBuffer> iter = (isReversed ? Lists.reverse(requested)
: requested).iterator();
 -                    public IColumn computeNext()
 +                    public Column computeNext()
                      {
                          while (iter.hasNext())
                          {


Mime
View raw message