upload code for cassandra/tdengine test

This commit is contained in:
fang 2019-08-14 11:21:44 +08:00
parent 01062e6691
commit c9ebc4e33e
1 changed files with 0 additions and 16 deletions

View File

@ -1,16 +0,0 @@
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;