Files
scylladb/db
Glauber Costa a7c1e16bc2 schema_tables: properly calculate index
We are currently assigning non-partition keys the index 0. That is not what
happens in Origin:

cqlsh> create table ks.twoclust \
        (ks int, cl1 int, cl2 int, r1 text, r2 text, primary key (ks, cl1, cl2));
cqlsh> select columnfamily_name, column_name, component_index \
        from system.schema_columns where keyspace_name='ks';

 columnfamily_name | column_name | component_index
-------------------+-------------+-----------------
          twoclust |         cl1 |               0
          twoclust |         cl2 |               1
          twoclust |          ks |            null
          twoclust |          r1 |               2
          twoclust |          r2 |               2

This is happening because we use column.position(), which has no knowledge of
the clustering keys at all.  We should instead pass that by the schema, which
will then do the right thing.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-07 09:30:54 -05:00
..
2015-04-17 15:08:06 +02:00
2015-06-03 10:13:52 +02:00
2015-07-25 17:34:56 +03:00