cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject [4/4] cassandra git commit: Merge branch 'cassandra-2.1' into trunk
Date Tue, 11 Nov 2014 19:33:48 GMT
Merge branch 'cassandra-2.1' into trunk

Conflicts:
	src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
	src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
	src/java/org/apache/cassandra/db/marshal/ListType.java
	src/java/org/apache/cassandra/db/marshal/TypeParser.java
	src/java/org/apache/cassandra/serializers/ListSerializer.java
	src/java/org/apache/cassandra/serializers/MapSerializer.java


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

Branch: refs/heads/trunk
Commit: fb4356a36a3066bf1c35d6f5e5b8472619b47960
Parents: f2e2862 ee55f36
Author: Tyler Hobbs <tyler@datastax.com>
Authored: Tue Nov 11 13:33:31 2014 -0600
Committer: Tyler Hobbs <tyler@datastax.com>
Committed: Tue Nov 11 13:33:31 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                     |   1 +
 bin/cqlsh                                       |  18 +
 pylib/cqlshlib/cql3handling.py                  |  19 +-
 .../apache/cassandra/cql3/AbstractMarker.java   |   2 +-
 src/java/org/apache/cassandra/cql3/CQL3Row.java |   2 +-
 .../org/apache/cassandra/cql3/CQL3Type.java     | 158 ++--
 .../apache/cassandra/cql3/ColumnCondition.java  | 275 ++++---
 .../org/apache/cassandra/cql3/Constants.java    |   2 +-
 src/java/org/apache/cassandra/cql3/Cql.g        |  14 +-
 src/java/org/apache/cassandra/cql3/Lists.java   |  64 +-
 src/java/org/apache/cassandra/cql3/Maps.java    |  61 +-
 .../org/apache/cassandra/cql3/Operation.java    |  16 +-
 src/java/org/apache/cassandra/cql3/Sets.java    |  80 +-
 src/java/org/apache/cassandra/cql3/Term.java    |   6 +
 src/java/org/apache/cassandra/cql3/Tuples.java  |  13 +-
 .../apache/cassandra/cql3/UntypedResultSet.java |   6 +-
 .../apache/cassandra/cql3/UpdateParameters.java |   2 +-
 .../org/apache/cassandra/cql3/UserTypes.java    |   3 +-
 .../cql3/statements/AlterTableStatement.java    |  39 +-
 .../cql3/statements/AlterTypeStatement.java     |  18 +-
 .../cql3/statements/CreateIndexStatement.java   |  24 +-
 .../cql3/statements/CreateTableStatement.java   |  28 +-
 .../cql3/statements/DeleteStatement.java        |   2 +-
 .../cql3/statements/DropTypeStatement.java      |   6 +-
 .../cassandra/cql3/statements/IndexTarget.java  |  23 +-
 .../cassandra/cql3/statements/Restriction.java  |   6 +
 .../cql3/statements/SelectStatement.java        |  84 +-
 .../statements/SingleColumnRestriction.java     |  24 +
 .../org/apache/cassandra/db/CFRowAdder.java     |   4 +-
 .../db/composites/AbstractCellNameType.java     |   4 +-
 .../cassandra/db/composites/CellNameType.java   |   2 +-
 .../db/composites/CompositesBuilder.java        |  41 +
 .../composites/CompoundSparseCellNameType.java  |   5 +-
 .../cassandra/db/filter/ExtendedFilter.java     |  47 +-
 .../cassandra/db/index/SecondaryIndex.java      |   6 +-
 .../db/index/SecondaryIndexManager.java         |  34 +-
 .../db/index/SecondaryIndexSearcher.java        |   2 +
 .../db/index/composites/CompositesIndex.java    |   4 +-
 .../CompositesIndexOnCollectionValue.java       |   2 +-
 .../cassandra/db/marshal/AbstractType.java      |  18 +
 .../cassandra/db/marshal/CollectionType.java    | 113 ++-
 .../db/marshal/ColumnToCollectionType.java      |   2 +-
 .../apache/cassandra/db/marshal/FrozenType.java |  62 ++
 .../apache/cassandra/db/marshal/ListType.java   |  75 +-
 .../apache/cassandra/db/marshal/MapType.java    | 103 ++-
 .../apache/cassandra/db/marshal/SetType.java    |  68 +-
 .../apache/cassandra/db/marshal/TupleType.java  |   9 +-
 .../apache/cassandra/db/marshal/TypeParser.java |  33 +-
 .../apache/cassandra/db/marshal/UserType.java   |   2 +-
 .../apache/cassandra/hadoop/pig/CqlStorage.java |   8 +-
 .../serializers/CollectionSerializer.java       |  24 +-
 .../cassandra/serializers/ListSerializer.java   |  35 +-
 .../cassandra/serializers/MapSerializer.java    |  38 +-
 .../apache/cassandra/transport/DataType.java    |  16 +-
 .../org/apache/cassandra/cql3/CQLTester.java    |  82 +-
 .../cassandra/cql3/ColumnConditionTest.java     |  28 +-
 .../cassandra/cql3/FrozenCollectionsTest.java   | 791 +++++++++++++++++++
 .../apache/cassandra/cql3/TupleTypeTest.java    |  44 +-
 .../db/marshal/CollectionTypeTest.java          |  22 +-
 .../cassandra/transport/SerDeserTest.java       |  13 +-
 .../cassandra/stress/generate/values/Lists.java |   2 +-
 .../cassandra/stress/generate/values/Sets.java  |   2 +-
 62 files changed, 2166 insertions(+), 571 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 1b981c6,5b63f48..d17f958
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,36 -1,5 +1,37 @@@
 +3.0
 + * Mark sstables as repaired after full repair (CASSANDRA-7586) 
 + * Extend Descriptor to include a format value and refactor reader/writer apis (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup (CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support pure user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929,
 +   7924, 7812, 8063)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 + * Fail on very large batch sizes (CASSANDRA-8011)
 + * improve concurrency of repair (CASSANDRA-6455)
 +
  2.1.3
+  * Support for frozen collections (CASSANDRA-7859)
   * Fix overflow on histogram computation (CASSANDRA-8028)
   * Have paxos reuse the timestamp generation of normal queries (CASSANDRA-7801)
  Merged from 2.0:

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/AbstractMarker.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/ColumnCondition.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/Constants.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/Lists.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/Maps.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/Sets.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/Term.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/Tuples.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/UntypedResultSet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/UserTypes.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index b6cbd30,09d1e52..7701cbd
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -698,28 -700,63 +698,43 @@@ public class SelectStatement implement
          // we always do a slice for CQL3 tables, so it's ok to ignore them here
          assert !isColumnRange();
  
 -        CBuilder builder = cfm.comparator.prefixBuilder();
 +        CompositesBuilder builder = new CompositesBuilder(cfm.comparator.prefixBuilder(),
cfm.comparator);
          Iterator<ColumnDefinition> idIter = cfm.clusteringColumns().iterator();
--        for (Restriction r : columnRestrictions)
++        for (int i = 0; i < columnRestrictions.length; i++)
          {
++            Restriction r = columnRestrictions[i];
              ColumnDefinition def = idIter.next();
              assert r != null && !r.isSlice();
  
-             List<ByteBuffer> values = r.values(options);
 -            if (r.isEQ())
++            if (r.isEQ() || !r.isMultiColumn())
+             {
 -                ByteBuffer val = r.values(options).get(0);
 -                if (val == null)
 -                    throw new InvalidRequestException(String.format("Invalid null value
for clustering key part %s", def.name));
 -                builder.add(val);
++                List<ByteBuffer> values = r.values(options);
++                if (values.isEmpty())
++                    return null;
++                builder.addEachElementToAll(values);
+             }
+             else
+             {
 -                if (!r.isMultiColumn())
 -                {
 -                    List<ByteBuffer> values = r.values(options);
 -                    // We have a IN, which we only support for the last column.
 -                    // If compact, just add all values and we're done. Otherwise,
 -                    // for each value of the IN, creates all the columns corresponding to
the selection.
 -                    if (values.isEmpty())
 -                        return null;
 -                    SortedSet<CellName> columns = new TreeSet<CellName>(cfm.comparator);
 -                    Iterator<ByteBuffer> iter = values.iterator();
 -                    while (iter.hasNext())
 -                    {
 -                        ByteBuffer val = iter.next();
 -                        if (val == null)
 -                            throw new InvalidRequestException(String.format("Invalid null
value for clustering key part %s", def.name));
++                // we have a multi-column IN restriction
++                List<List<ByteBuffer>> splitValues = ((MultiColumnRestriction.IN)
r).splitValues(options);
++                if (splitValues.isEmpty())
++                    return null;
  
-             if (values.isEmpty())
-                 return null;
 -                        Composite prefix = builder.buildWith(val);
 -                        columns.addAll(addSelectedColumns(prefix));
 -                    }
 -                    return columns;
 -                }
 -                else
 -                {
 -                    // we have a multi-column IN restriction
 -                    List<List<ByteBuffer>> values = ((MultiColumnRestriction.IN)
r).splitValues(options);
 -                    TreeSet<CellName> inValues = new TreeSet<>(cfm.comparator);
 -                    for (List<ByteBuffer> components : values)
 -                    {
 -                        for (int i = 0; i < components.size(); i++)
 -                            if (components.get(i) == null)
 -                                throw new InvalidRequestException("Invalid null value in
condition for column " + cfm.clusteringColumns().get(i + def.position()));
++                builder.addAllElementsToAll(splitValues);
+ 
 -                        Composite prefix = builder.buildWith(components);
 -                        inValues.addAll(addSelectedColumns(prefix));
 -                    }
 -                    return inValues;
 -                }
++                // increment i to skip the remainder of the multicolumn restriction
++                i += splitValues.get(0).size() - 1;
+             }
 +
-             builder.addEachElementToAll(values);
 +            if (builder.containsNull())
 +                throw new InvalidRequestException(String.format("Invalid null value for
clustering key part %s",
-                                                                 def.name));
++                        def.name));
          }
-         SortedSet<CellName> columns = new TreeSet<CellName>(cfm.comparator);
+ 
 -        return addSelectedColumns(builder.build());
++        SortedSet<CellName> columns = new TreeSet<>(cfm.comparator);
 +        for (Composite composite : builder.build())
 +            columns.addAll(addSelectedColumns(composite));
- 
 +        return columns;
      }
  
      private SortedSet<CellName> addSelectedColumns(Composite prefix)
@@@ -1891,9 -1965,17 +1919,15 @@@
                  }
                  else if (restriction.isIN())
                  {
 -                    if (!restriction.isMultiColumn() && i != stmt.columnRestrictions.length
- 1)
 -                        throw new InvalidRequestException(String.format("Clustering column
\"%s\" cannot be restricted by an IN relation", cdef.name));
 -                    else if (stmt.selectACollection())
 +                    if (stmt.selectACollection())
                          throw new InvalidRequestException(String.format("Cannot restrict
column \"%s\" by IN relation as a collection is selected by the query", cdef.name));
                  }
+                 /*
+                 else if (restriction.isContains() && !hasQueriableIndex)
+                 {
+                     throw new InvalidRequestException(String.format("Cannot restrict column
\"%s\" by a CONTAINS relation without a secondary index", cdef.name));
+                 }
+                 */
  
                  previous = cdef;
              }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/db/composites/CellNameType.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/db/composites/CompositesBuilder.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/composites/CompositesBuilder.java
index 29fe905,0000000..4542ac5
mode 100644,000000..100644
--- a/src/java/org/apache/cassandra/db/composites/CompositesBuilder.java
+++ b/src/java/org/apache/cassandra/db/composites/CompositesBuilder.java
@@@ -1,219 -1,0 +1,260 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.db.composites;
 +
 +import java.nio.ByteBuffer;
 +import java.util.ArrayList;
 +import java.util.Comparator;
 +import java.util.List;
 +import java.util.Set;
 +import java.util.TreeSet;
 +
 +import org.apache.cassandra.db.composites.Composite.EOC;
 +
 +import static java.util.Collections.singletonList;
 +
 +/**
 + * Builder that allow to build multiple composites at the same time.
 + */
 +public final class CompositesBuilder
 +{
 +    /**
 +     * The builder used to build the <code>Composite</code>s.
 +     */
 +    private final CBuilder builder;
 +
 +    /**
 +     * The comparator used to sort the returned <code>Composite</code>s.
 +     */
 +    private final Comparator<Composite> comparator;
 +
 +    /**
 +     * The elements of the composites
 +     */
 +    private final List<List<ByteBuffer>> elementsList = new ArrayList<>();
 +
 +    /**
 +     * The number of elements that still can be added.
 +     */
 +    private int remaining;
 +
 +    /**
 +     * <code>true</code> if the composites have been build, <code>false</code>
otherwise.
 +     */
 +    private boolean built;
 +
 +    /**
 +     * <code>true</code> if the composites contains some <code>null</code>
elements.
 +     */
 +    private boolean containsNull;
 +
 +    public CompositesBuilder(CBuilder builder, Comparator<Composite> comparator)
 +    {
 +        this.builder = builder;
 +        this.comparator = comparator;
 +        this.remaining = builder.remainingCount();
 +    }
 +
 +    /**
 +     * Adds the specified element to all the composites.
 +     * <p>
 +     * If this builder contains 2 composites: A-B and A-C a call to this method to add D
will result in the composites:
 +     * A-B-D and A-C-D.
 +     * </p>
 +     *
 +     * @param value the value of the next element
 +     * @return this <code>CompositeBuilder</code>
 +     */
 +    public CompositesBuilder addElementToAll(ByteBuffer value)
 +    {
 +        checkUpdateable();
 +
 +        if (isEmpty())
 +            elementsList.add(new ArrayList<ByteBuffer>());
 +
 +        for (int i = 0, m = elementsList.size(); i < m; i++)
 +        {
 +            if (value == null)
 +                containsNull = true;
 +
 +            elementsList.get(i).add(value);
 +        }
 +        remaining--;
 +        return this;
 +    }
 +
 +    /**
 +     * Adds individually each of the specified elements to the end of all of the existing
composites.
 +     * <p>
 +     * If this builder contains 2 composites: A-B and A-C a call to this method to add D
and E will result in the 4
 +     * composites: A-B-D, A-B-E, A-C-D and A-C-E.
 +     * </p>
 +     *
 +     * @param values the elements to add
 +     * @return this <code>CompositeBuilder</code>
 +     */
 +    public CompositesBuilder addEachElementToAll(List<ByteBuffer> values)
 +    {
 +        checkUpdateable();
 +
 +        if (isEmpty())
 +            elementsList.add(new ArrayList<ByteBuffer>());
 +
 +        for (int i = 0, m = elementsList.size(); i < m; i++)
 +        {
 +            List<ByteBuffer> oldComposite = elementsList.remove(0);
 +
 +            for (int j = 0, n = values.size(); j < n; j++)
 +            {
 +                List<ByteBuffer> newComposite = new ArrayList<>(oldComposite);
 +                elementsList.add(newComposite);
 +
 +                ByteBuffer value = values.get(j);
 +
 +                if (value == null)
 +                    containsNull = true;
 +
 +                newComposite.add(values.get(j));
 +            }
 +        }
 +
 +        remaining--;
 +        return this;
 +    }
 +
++
++    /**
++     * Adds individually each of the specified list of elements to the end of all of the
existing composites.
++     * <p>
++     * If this builder contains 2 composites: A-B and A-C a call to this method to add [[D,
E], [F, G]] will result in the 4
++     * composites: A-B-D-E, A-B-F-G, A-C-D-E and A-C-F-G.
++     * </p>
++     *
++     * @param values the elements to add
++     * @return this <code>CompositeBuilder</code>
++     */
++    public CompositesBuilder addAllElementsToAll(List<List<ByteBuffer>> values)
++    {
++        assert !values.isEmpty();
++        checkUpdateable();
++
++        if (isEmpty())
++            elementsList.add(new ArrayList<ByteBuffer>());
++
++        for (int i = 0, m = elementsList.size(); i < m; i++)
++        {
++            List<ByteBuffer> oldComposite = elementsList.remove(0);
++
++            for (int j = 0, n = values.size(); j < n; j++)
++            {
++                List<ByteBuffer> newComposite = new ArrayList<>(oldComposite);
++                elementsList.add(newComposite);
++
++                List<ByteBuffer> value = values.get(j);
++
++                if (value.contains(null))
++                    containsNull = true;
++
++                newComposite.addAll(value);
++            }
++        }
++
++        remaining -= values.get(0).size();
++        return this;
++    }
++
 +    /**
 +     * Returns the number of elements that can be added to the composites.
 +     *
 +     * @return the number of elements that can be added to the composites.
 +     */
 +    public int remainingCount()
 +    {
 +        return remaining;
 +    }
 +
 +    /**
 +     * Checks if some elements can still be added to the composites.
 +     *
 +     * @return <code>true</code> if it is possible to add more elements to the
composites, <code>false</code> otherwise.
 +     */
 +    public boolean hasRemaining()
 +    {
 +        return remaining > 0;
 +    }
 +
 +    /**
 +     * Checks if this builder is empty.
 +     *
 +     * @return <code>true</code> if this builder is empty, <code>false</code>
otherwise.
 +     */
 +    public boolean isEmpty()
 +    {
 +        return elementsList.isEmpty();
 +    }
 +
 +    /**
 +     * Checks if the composites contains null elements.
 +     *
 +     * @return <code>true</code> if the composites contains <code>null</code>
elements, <code>false</code> otherwise.
 +     */
 +    public boolean containsNull()
 +    {
 +        return containsNull;
 +    }
 +
 +    /**
 +     * Builds the <code>Composites</code>.
 +     *
 +     * @return the composites
 +     */
 +    public List<Composite> build()
 +    {
 +        return buildWithEOC(EOC.NONE);
 +    }
 +
 +    /**
 +     * Builds the <code>Composites</code> with the specified EOC.
 +     *
 +     * @return the composites
 +     */
 +    public List<Composite> buildWithEOC(EOC eoc)
 +    {
 +        built = true;
 +
 +        if (elementsList.isEmpty())
 +            return singletonList(builder.build().withEOC(eoc));
 +
 +        // Use a TreeSet to sort and eliminate duplicates
 +        Set<Composite> set = new TreeSet<Composite>(comparator);
 +
 +        for (int i = 0, m = elementsList.size(); i < m; i++)
 +        {
 +            List<ByteBuffer> elements = elementsList.get(i);
 +            set.add(builder.buildWith(elements).withEOC(eoc));
 +        }
 +
 +        return new ArrayList<>(set);
 +    }
 +
 +    private void checkUpdateable()
 +    {
 +        if (!hasRemaining() || built)
 +            throw new IllegalStateException("this CompositesBuilder cannot be updated anymore");
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 06a1e0e,fbbec1d..10a7ce3
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@@ -33,7 -34,7 +34,6 @@@ import java.util.concurrent.ConcurrentN
  import java.util.concurrent.ConcurrentSkipListMap;
  import java.util.concurrent.Future;
  
- import org.apache.cassandra.io.sstable.format.SSTableReader;
 -import org.apache.cassandra.utils.ByteBufferUtil;
  import org.apache.commons.lang3.StringUtils;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
@@@ -53,6 -54,7 +53,8 @@@ import org.apache.cassandra.db.filter.E
  import org.apache.cassandra.exceptions.ConfigurationException;
  import org.apache.cassandra.exceptions.InvalidRequestException;
  import org.apache.cassandra.io.sstable.ReducingKeyIterator;
 -import org.apache.cassandra.io.sstable.SSTableReader;
++import org.apache.cassandra.io.sstable.format.SSTableReader;
++import org.apache.cassandra.utils.ByteBufferUtil;
  import org.apache.cassandra.utils.FBUtilities;
  import org.apache.cassandra.utils.concurrent.OpOrder;
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/db/marshal/AbstractType.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/db/marshal/TupleType.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/db/marshal/TypeParser.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/marshal/TypeParser.java
index 37f8708,cdb5679..fed6f7f
--- a/src/java/org/apache/cassandra/db/marshal/TypeParser.java
+++ b/src/java/org/apache/cassandra/db/marshal/TypeParser.java
@@@ -572,7 -584,9 +584,8 @@@ public class TypeParse
          {
              sb.append(',');
              sb.append(ByteBufferUtil.bytesToHex(columnNames.get(i))).append(":");
-             sb.append(columnTypes.get(i));
 -
+             // omit FrozenType(...) from fields because it is currently implicit
+             sb.append(columnTypes.get(i).toString(true));
          }
          sb.append(')');
          return sb.toString();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/db/marshal/UserType.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/src/java/org/apache/cassandra/serializers/MapSerializer.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/serializers/MapSerializer.java
index 7e132b8,bc8e509..8350f66
--- a/src/java/org/apache/cassandra/serializers/MapSerializer.java
+++ b/src/java/org/apache/cassandra/serializers/MapSerializer.java
@@@ -22,6 -22,9 +22,8 @@@ import java.nio.BufferUnderflowExceptio
  import java.nio.ByteBuffer;
  import java.util.*;
  
+ import org.apache.cassandra.db.marshal.AbstractType;
+ import org.apache.cassandra.transport.Server;
 -import org.apache.cassandra.utils.ByteBufferUtil;
  import org.apache.cassandra.utils.Pair;
  
  public class MapSerializer<K, V> extends CollectionSerializer<Map<K, V>>

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4356a3/test/unit/org/apache/cassandra/cql3/CQLTester.java
----------------------------------------------------------------------


Mime
View raw message