As described in https://github.com/scylladb/scylladb/issues/8638, we're moving away from `SimpleStrategy`, in the future it will become deprecated. We should remove all uses of it and replace them with `NetworkTopologyStrategy`. This change replaces `SimpleStrategy` with `NetworkTopologyStrategy` in all unit tests, or at least in the ones where it was reasonable to do so. Some of the tests were written explicitly to test the `SimpleStrategy` strategy, or changing the keyspace from `SimpleStrategy` to `NetworkTopologyStrategy`. These tests were left intact. It's still a feature that is supported, even if it's slowly getting deprecated. The typical way to use `NetworkTopologyStrategy` is to specify a replication factor for each datacenter. This could be a bit cumbersome, we would have to fetch the list of datacenters, set the repfactors, etc. Luckily there is another way - we can just specify a replication factor to use for or each existing datacenter, like this: ```cql CREATE KEYSPACE {} WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}; ``` This makes the change rather straightforward - just replace all instances of `'SimpleStrategy'', with `'NetworkTopologyStrategy'`. Refs: https://github.com/scylladb/scylladb/issues/8638 Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com> Closes #13990
17 lines
689 B
SQL
17 lines
689 B
SQL
-- Error messages contain a keyspace name. Make the output stable.
|
|
CREATE KEYSPACE ks WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 1};
|
|
-- setup
|
|
create table ks.my_table (key int primary key);
|
|
insert into ks.my_table (key) values (1);
|
|
|
|
-- test list<varint>
|
|
create function ks.my_func(val int) called on null input returns list<varint> language lua as 'return {1,2,3}';
|
|
select ks.my_func(key) from ks.my_table;
|
|
drop function ks.my_func;
|
|
|
|
-- test list<decimal>
|
|
create function ks.my_func(val int) called on null input returns list<decimal> language lua as 'return {1,2,3}';
|
|
select ks.my_func(key) from ks.my_table;
|
|
drop function ks.my_func;
|
|
DROP KEYSPACE ks;
|