Merge branch 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/598008d4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/598008d4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/598008d4 Branch: refs/heads/cassandra-3.0 Commit: 598008d43ce88ea27dddd6974ec0f247faa0d79c Parents: 22bb413 594cde7 Author: Benjamin Lerer <b.le...@gmail.com> Authored: Tue Apr 17 12:12:48 2018 +0200 Committer: Benjamin Lerer <b.le...@gmail.com> Committed: Tue Apr 17 12:12:48 2018 +0200 ---------------------------------------------------------------------- CHANGES.txt | 2 + .../org/apache/cassandra/cql3/ResultSet.java | 5 ++ .../cassandra/cql3/selection/Selection.java | 69 +++++++++++++++++--- .../cql3/statements/SelectStatement.java | 19 +++--- .../cql3/validation/entities/JsonTest.java | 21 ++++++ 5 files changed, 97 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/598008d4/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 9012f8c,967ee05..d3d8036 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,20 -1,7 +1,22 @@@ -2.2.13 +3.0.17 + * Avoid deadlock when running nodetool refresh before node is fully up (CASSANDRA-14310) + * Handle all exceptions when opening sstables (CASSANDRA-14202) + * Handle incompletely written hint descriptors during startup (CASSANDRA-14080) + * Handle repeat open bound from SRP in read repair (CASSANDRA-14330) + * Use zero as default score in DynamicEndpointSnitch (CASSANDRA-14252) + * Respect max hint window when hinting for LWT (CASSANDRA-14215) + * Adding missing WriteType enum values to v3, v4, and v5 spec (CASSANDRA-13697) + * Don't regenerate bloomfilter and summaries on startup (CASSANDRA-11163) + * Fix NPE when performing comparison against a null frozen in LWT (CASSANDRA-14087) + * Log when SSTables are deleted (CASSANDRA-14302) + * Fix batch commitlog sync regression (CASSANDRA-14292) + * Write to pending endpoint when view replica is also base replica (CASSANDRA-14251) + * Chain commit log marker potential performance regression in batch commit mode (CASSANDRA-14194) + * Fully utilise specified compaction threads (CASSANDRA-14210) + * Pre-create deletion log records to finish compactions quicker (CASSANDRA-12763) +Merged from 2.2: + * Fix JSON queries with IN restrictions and ORDER BY clause (CASSANDRA-14286) + * CQL fromJson(null) throws NullPointerException (CASSANDRA-13891) - * Fix query pager DEBUG log leak causing hit in paged reads throughput (CASSANDRA-14318) * Backport circleci yaml (CASSANDRA-14240) Merged from 2.1: * Check checksum before decompressing data (CASSANDRA-14284) http://git-wip-us.apache.org/repos/asf/cassandra/blob/598008d4/src/java/org/apache/cassandra/cql3/ResultSet.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/598008d4/src/java/org/apache/cassandra/cql3/selection/Selection.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cql3/selection/Selection.java index 406f849,5385fc6..6227158 --- a/src/java/org/apache/cassandra/cql3/selection/Selection.java +++ b/src/java/org/apache/cassandra/cql3/selection/Selection.java @@@ -399,8 -434,17 +450,10 @@@ public abstract class Selectio sb.append(spec.type.toJSONString(buffer, protocolVersion)); } sb.append("}"); - return Collections.singletonList(UTF8Type.instance.getSerializer().serialize(sb.toString())); + List<ByteBuffer> jsonRow = new ArrayList<>(); + jsonRow.add(UTF8Type.instance.getSerializer().serialize(sb.toString())); + return jsonRow; } - - private ByteBuffer value(Cell c) - { - return (c instanceof CounterCell) - ? ByteBufferUtil.bytes(CounterContext.instance().total(c.value())) - : c.value(); - } } private static interface Selectors http://git-wip-us.apache.org/repos/asf/cassandra/blob/598008d4/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java index 1e867bc,729cf83..a5e6254 --- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java @@@ -911,14 -841,14 +911,14 @@@ public class SelectStatement implement if (!parameters.orderings.isEmpty()) { + assert !forView; verifyOrderingIsAllowed(restrictions); - orderingComparator = getOrderingComparator(cfm, selection, restrictions); + orderingComparator = getOrderingComparator(cfm, selection, restrictions, parameters.isJson); 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/598008d4/test/unit/org/apache/cassandra/cql3/validation/entities/JsonTest.java ---------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org