順番に並べ替えられたクラスタリング キーの一部である、フローズン > 型の列によるフィルタリングで問題が発生していますDESC
。
環境
これは私のキースペースとテーブルの定義です
CREATE KEYSPACE hello WITH replication =
{'class': 'SimpleStrategy', 'replication_factor': 1 };
CREATE TABLE hello.table1 (
fn bigint,
et smallint,
st frozen<list<bigint>>,
tn bigint,
ts timestamp,
PRIMARY KEY ((fn, et), st, tn));
CREATE TABLE hello.table2 (
fn bigint,
et smallint,
st frozen<list<bigint>>,
tn bigint,
ts timestamp,
PRIMARY KEY ((fn, et), st, tn)) WITH CLUSTERING ORDER BY (st DESC, tn DESC);
何が効...
レコードを正常に挿入できますtable1
:
INSERT INTO hello.table1(fn, et,st,tn, ts) VALUES ( 1,1,[23],1,0);
INSERT INTO hello.table1(fn, et,st,tn, ts) VALUES ( 1,1,[24],1,0);
INSERT INTO hello.table1(fn, et,st,tn, ts) VALUES ( 1,1,[25],1,0);
where
レコードを選択し、節で固定列を指定しても問題なく動作します
select * from hello.table1 where fn=1 and et=1 and st=[23];
何がうまくいかない...
へのレコードの挿入は機能しtable2
ません:
INSERT INTO hello.table2(fn, et,st,tn, ts) VALUES ( 1,1,[23],1,0);
また、(アプリケーションから) レコードが既に挿入されている場合、レコードを選択し、where
節で固定列を指定しても機能しません。
select * from hello.table2 where fn=1 and et=1 and st=[23];