ScyllaDB - [无效查询] 消息="Collection filtering is not supported yet"

ScyllaDB - [Invalid query] message="Collection filtering is not supported yet"

我有一个 table,其中有一列类型为列表,我想使用 CONTAINS 关键字检查列表中是否有项目。

根据 scylla 文档:

The CONTAINS operator may only be used on collection columns (lists, sets, and maps). In the case of maps, CONTAINS applies to the map values. The CONTAINS KEY operator may only be used on map columns and applies to the map keys.

https://docs.scylladb.com/getting-started/dml/

要重现我收到的错误,请执行以下操作:

CREATE TABLE test.persons ( id int PRIMARY KEY,lastname text, books list<text>);
INSERT INTO test.persons(id, lastname, books) values (1, 'Testopoulos',['Dracula','1984']);
SELECT * FROM test.persons


 id | books               | lastname
----+---------------------+-------------
  1 | ['Dracula', '1984'] | Testopoulos

(1 rows)

SELECT * FROM test.persons WHERE books CONTAINS '1984' ALLOW FILTERING;

InvalidRequest: Error from server: code=2200 [Invalid query] message="Collection filtering is not supported yet"

支持 CONTAINS 关键字过滤已在 Scylla 中实现,但它还不是任何官方版本的一部分 - 它将包含在即将发布的 3.1 版本中(或者,自然地,如果你自己构建它来自最新的来源)。

这是来自官方追踪器的参考:https://github.com/scylladb/scylla/issues/3573