136 lines
3.6 KiB
Plaintext
136 lines
3.6 KiB
Plaintext
sql connect
|
|
sql use testc;
|
|
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a join stc2 b on a.ts = b.ts;
|
|
if $rows != 8 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a join stc2 b on a.ts = b.ts and a.t->'tag1' = b.t->'tag1';
|
|
if $rows != 0 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a join stc2 b on a.ts = b.ts and a.t->'tag2' = b.t->'tag2';
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left join stc2 b on a.ts = b.ts;
|
|
if $rows != 8 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left join stc2 b on a.ts = b.ts and a.t->'tag1' = b.t->'tag1';
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left join stc2 b on a.ts = b.ts and a.t->'tag2' = b.t->'tag2';
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left semi join stc2 b on a.ts = b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left semi join stc2 b on a.ts = b.ts and a.t->'tag1' = b.t->'tag1';
|
|
if $rows != 0 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left semi join stc2 b on a.ts = b.ts and a.t->'tag2' = b.t->'tag2';
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left anti join stc2 b on a.ts = b.ts;
|
|
if $rows != 0 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left anti join stc2 b on a.ts = b.ts and a.t->'tag1' = b.t->'tag1';
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left anti join stc2 b on a.ts = b.ts and a.t->'tag2' = b.t->'tag2';
|
|
if $rows != 0 then
|
|
return -1
|
|
endi
|
|
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left asof join stc2 b;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left asof join stc2 b on a.t->'tag1' = b.t->'tag1';
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
if $data02 != NULL then
|
|
return -1
|
|
endi
|
|
if $data12 != NULL then
|
|
return -1
|
|
endi
|
|
if $data22 != NULL then
|
|
return -1
|
|
endi
|
|
if $data32 != NULL then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left asof join stc2 b on a.t->'tag2' = b.t->'tag2';
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
if $data02 != @23-10-16 09:10:11.000@ then
|
|
return -1
|
|
endi
|
|
if $data12 != @23-10-16 09:10:12.000@ then
|
|
return -1
|
|
endi
|
|
if $data22 != @23-10-16 09:10:11.000@ then
|
|
return -1
|
|
endi
|
|
if $data32 != @23-10-16 09:10:12.000@ then
|
|
return -1
|
|
endi
|
|
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left window join stc2 b window_offset(0s, 1s);
|
|
if $rows != 12 then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left window join stc2 b on a.t->'tag1' = b.t->'tag1' window_offset(0s, 1s);
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
if $data02 != NULL then
|
|
return -1
|
|
endi
|
|
if $data12 != NULL then
|
|
return -1
|
|
endi
|
|
if $data22 != NULL then
|
|
return -1
|
|
endi
|
|
if $data32 != NULL then
|
|
return -1
|
|
endi
|
|
sql select a.ts, a.t->'tag1', b.ts, b.t->'tag1' from stc1 a left window join stc2 b on a.t->'tag2' = b.t->'tag2' window_offset(0s, 1s);
|
|
if $rows != 6 then
|
|
return -1
|
|
endi
|
|
if $data02 != @23-10-16 09:10:11.000@ then
|
|
return -1
|
|
endi
|
|
if $data12 != @23-10-16 09:10:12.000@ then
|
|
return -1
|
|
endi
|
|
if $data22 != @23-10-16 09:10:12.000@ then
|
|
return -1
|
|
endi
|
|
if $data32 != @23-10-16 09:10:11.000@ then
|
|
return -1
|
|
endi
|
|
if $data42 != @23-10-16 09:10:12.000@ then
|
|
return -1
|
|
endi
|
|
if $data52 != @23-10-16 09:10:12.000@ then
|
|
return -1
|
|
endi
|
|
|