Nadav Har'El
a0bc0d2d11
secondary index: fix support for compound partition key
...
In the current code, if the base table has a compound partition key (i.e.,
multiple partition-key columns) searching its secondary indexes didn't work.
There is no real reason why this, it was a just a bug in preparing the
second query:
Every SI query is converted to two queries. The first queries the associated
materialized view, to find a list of primary keys. Those we need to use in a
second query, of the base table. The second query needs to list, as
restrictions, the keys found above. When a partition key is compound, its
components build one key and one restriction. But in the buggy code, we
incorrectly used each component as a separate (improperly formatted) key
and restriction, and obviously this didn't work.
This patch also adds a test that reproduces this problem and confirms its fix.
In the fixed code I also found another incorrect use of to_cql_string() (which
could break case-sensitive primary key column names) and changed it to
to_string().
Fixes #3210 .
Signed-off-by: Nadav Har'El <nyh@scylladb.com >
Message-Id: <20180429124138.24406-1-nyh@scylladb.com >
2018-04-29 14:40:13 +01:00
..
2018-04-24 10:58:38 +03:00
2018-04-26 14:34:20 -07:00
2018-01-14 13:17:09 +01:00
2016-10-26 08:51:21 +03:00
2016-10-26 08:51:21 +03:00
2018-02-14 14:15:59 -05:00
2018-02-14 14:15:58 -05:00
2018-04-16 10:20:50 +02:00
2017-11-27 20:27:42 +01:00
2016-10-26 08:51:21 +03:00
2018-03-06 11:50:27 +01:00
2017-12-04 17:42:23 -08:00
2018-03-12 20:05:23 +02:00
2017-11-27 20:27:42 +01:00
2018-01-21 19:09:03 +01:00
2018-01-31 11:34:08 +01:00
2017-11-27 20:27:42 +01:00
2017-11-27 20:27:42 +01:00
2018-04-29 11:03:21 +03:00
2017-12-08 13:38:13 -05:00
2018-02-06 12:10:10 +02:00
2017-11-27 20:27:42 +01:00
2018-04-29 11:03:21 +03:00
2018-01-21 12:58:42 +02:00
2018-03-27 01:20:11 +01:00
2018-03-27 01:20:11 +01:00
2018-03-14 01:54:31 -04:00
2018-03-01 12:06:59 -05:00
2018-04-24 23:12:07 +01:00
2018-03-27 01:20:11 +01:00
2018-03-27 01:20:11 +01:00
2017-12-08 10:12:21 -05:00
2018-02-01 00:22:50 +00:00
2017-11-27 20:27:42 +01:00
2018-04-29 11:03:21 +03:00
2018-03-11 18:22:49 +02:00
2018-02-14 14:15:59 -05:00
2018-04-24 11:29:57 +02:00
2017-11-28 12:38:28 +01:00
2018-02-14 16:42:49 +01:00
2018-03-12 20:05:23 +02:00
2018-03-05 15:22:33 +02:00
2018-03-12 20:05:23 +02:00
2018-03-11 18:22:49 +02:00
2018-03-27 01:20:10 +01:00
2018-03-27 01:20:10 +01:00
2017-11-27 20:27:42 +01:00
2017-11-27 20:27:42 +01:00
2018-03-12 20:05:23 +02:00
2017-11-27 20:27:42 +01:00
2016-10-26 08:51:21 +03:00
2017-11-27 20:27:42 +01:00
2018-04-16 21:00:35 +02:00
2018-03-19 12:16:11 +02:00
2017-09-18 12:44:05 +02:00
2018-04-29 11:03:21 +03:00
2017-11-27 20:27:42 +01:00
2017-11-27 20:27:42 +01:00
2017-08-28 21:00:06 +02:00
2017-11-27 20:27:42 +01:00
2017-11-27 20:27:42 +01:00
2018-03-06 11:50:29 +01:00
2018-02-14 16:42:49 +01:00
2018-02-08 18:24:58 +02:00
2017-11-27 20:27:42 +01:00
2016-10-26 08:51:21 +03:00
2018-01-24 20:56:48 +01:00
2017-12-01 10:52:37 +01:00
2018-03-12 20:05:23 +02:00
2018-01-21 12:58:42 +02:00
2018-04-11 10:03:50 +03:00
2018-03-22 15:00:48 +01:00
2017-12-22 11:06:33 +01:00
2018-03-06 11:50:27 +01:00
2018-03-06 11:50:29 +01:00
2018-04-21 13:53:29 +01:00
2017-11-27 20:27:42 +01:00
2017-11-27 20:27:42 +01:00
2018-01-21 12:58:42 +02:00
2018-04-11 10:55:21 +03:00
2017-11-27 20:27:42 +01:00
2017-11-27 20:27:42 +01:00
2017-11-07 15:33:24 +01:00
2018-02-05 12:31:37 +00:00
2018-02-14 14:15:58 -05:00
2018-03-07 16:52:59 +01:00
2018-01-24 20:54:45 +01:00
2018-04-29 11:03:21 +03:00
2018-01-30 16:19:43 +02:00
2018-04-27 17:12:33 +03:00
2018-02-07 10:11:46 +00:00
2018-04-29 14:40:13 +01:00
2018-02-19 13:08:58 +00:00
2018-03-22 14:44:54 +01:00
2017-11-27 20:27:42 +01:00
2018-04-26 14:34:20 -07:00
2018-03-29 15:23:31 +03:00
2018-04-27 22:03:38 +03:00
2018-04-27 22:03:38 +03:00
2018-04-24 11:29:57 +02:00
2018-04-26 12:49:37 +02:00
2018-04-24 11:29:57 +02:00
2018-01-24 20:56:48 +01:00
2018-01-17 12:17:17 +01:00
2017-11-27 20:27:42 +01:00
2017-11-27 20:27:42 +01:00
2018-03-12 20:05:23 +02:00
2017-11-27 20:27:42 +01:00
2017-07-16 11:55:08 +02:00
2018-03-14 23:49:07 +00:00
2018-04-24 23:12:07 +01:00
2017-02-22 09:19:22 +00:00
2018-03-27 01:20:11 +01:00
2018-04-23 09:32:03 +01:00
2018-04-23 16:49:29 +03:00
2018-04-16 20:26:44 +02:00
2018-03-27 01:20:10 +01:00