提交 c9ebc4e3 编写于 作者: F fang

upload code for cassandra/tdengine test

上级 01062e66
drop keyspace if exists cassandra;
CREATE KEYSPACE cassandra WITH replication = {'class':'SimpleStrategy', 'replication_factor':1};
USE cassandra;
create table test (devid int, devname text, devgroup int, ts bigint, minute bigint, temperature int, humidity float,primary key (ts, devgroup, minute));
insert into test (devid,devname,devgroup,ts, minute,temperature,humidity) values (1, 'dev_1', 1,120000,1,1,1.2);
create function tominute (ts bigint) returns null on null input returns bigint language java as $$ return ts/6000; $$;
select * from test where devgroup<1 allow filtering;
##############################################################
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
change primary key, can't be same;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册