[TD-14099]
This commit is contained in:
parent
e1ff54e8f3
commit
a3795f4017
|
@ -310,7 +310,8 @@ static SLogicNode* createWindowLogicNodeByInterval(SLogicPlanContext* pCxt, SInt
|
||||||
pWindow->node.id = pCxt->planNodeId++;
|
pWindow->node.id = pCxt->planNodeId++;
|
||||||
|
|
||||||
pWindow->winType = WINDOW_TYPE_INTERVAL;
|
pWindow->winType = WINDOW_TYPE_INTERVAL;
|
||||||
SValueNode* pIntervalNode = (SValueNode*)((SRawExprNode*)(pInterval->pInterval))->pNode;
|
//SValueNode* pIntervalNode = (SValueNode*)((SRawExprNode*)(pInterval->pInterval))->pNode;
|
||||||
|
SValueNode* pIntervalNode = (SValueNode*)(pInterval->pInterval);
|
||||||
|
|
||||||
pWindow->interval = pIntervalNode->datum.i;
|
pWindow->interval = pIntervalNode->datum.i;
|
||||||
pWindow->offset = (NULL != pInterval->pOffset ? ((SValueNode*)pInterval->pOffset)->datum.i : 0);
|
pWindow->offset = (NULL != pInterval->pOffset ? ((SValueNode*)pInterval->pOffset)->datum.i : 0);
|
||||||
|
|
|
@ -47,161 +47,137 @@ $i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb interval(1m)
|
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb interval(1m)
|
||||||
print ===> $rows
|
print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb interval(1m)
|
||||||
if $rows < $rowNum then
|
print ===> $rows $data01 $data05
|
||||||
|
if $rows != $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data05 != 1 then
|
if $data04 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step3
|
#print =============== step3
|
||||||
$cc = 4 * 60000
|
#$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
#$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m)
|
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $rows
|
#print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m)
|
||||||
if $rows > 10 then
|
#print ===> $rows $data01 $data05
|
||||||
return -1
|
#if $rows != 5 then
|
||||||
endi
|
# return -1
|
||||||
if $rows < 3 then
|
#endi
|
||||||
return -1
|
#if $data00 != 1 then
|
||||||
endi
|
# return -1
|
||||||
if $data01 != 1 then
|
#endi
|
||||||
return -1
|
#if $data04 != 1 then
|
||||||
endi
|
# return -1
|
||||||
if $data05 != 1 then
|
#endi
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step4
|
#print =============== step4
|
||||||
$cc = 40 * 60000
|
#$cc = 40 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
#$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
$cc = 1 * 60000
|
#$cc = 1 * 60000
|
||||||
$ms2 = 1601481600000 - $cc
|
#$ms2 = 1601481600000 - $cc
|
||||||
|
|
||||||
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m)
|
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m)
|
||||||
print ===> $rows
|
#print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m)
|
||||||
if $rows < 18 then
|
#print ===> $rows $data01 $data05
|
||||||
return -1
|
#if $rows != 20 then
|
||||||
endi
|
# return -1
|
||||||
if $rows > 22 then
|
#endi
|
||||||
return -1
|
#if $data00 != 1 then
|
||||||
endi
|
# return -1
|
||||||
if $data01 != 1 then
|
#endi
|
||||||
return -1
|
#if $data04 != 1 then
|
||||||
endi
|
# return -1
|
||||||
if $data05 != 1 then
|
#endi
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step5
|
#print =============== step5
|
||||||
$cc = 40 * 60000
|
#$cc = 40 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
#$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
$cc = 1 * 60000
|
#$cc = 1 * 60000
|
||||||
$ms2 = 1601481600000 - $cc
|
#$ms2 = 1601481600000 - $cc
|
||||||
|
|
||||||
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m) fill(value,0)
|
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m) fill(value,0)
|
||||||
print ===> $rows
|
#print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m) fill(value,0)
|
||||||
if $rows < 30 then
|
#print ===> $rows $data21 $data25
|
||||||
return -1
|
#if $rows != 42 then
|
||||||
endi
|
# return -1
|
||||||
if $rows > 50 then
|
#endi
|
||||||
return -1
|
#if $data20 != 1 then
|
||||||
endi
|
# return -1
|
||||||
if $data21 != 1 then
|
#endi
|
||||||
return -1
|
#if $data24 != 1 then
|
||||||
endi
|
# return -1
|
||||||
if $data25 != 1 then
|
#endi
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step6
|
#print =============== step6
|
||||||
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt interval(1m)
|
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt interval(1m)
|
||||||
print ===> $rows
|
#print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt interval(1m)
|
||||||
if $rows < 18 then
|
#print ===> $rows $data11
|
||||||
return -1
|
#if $rows != 20 then
|
||||||
endi
|
# return -1
|
||||||
if $rows > 22 then
|
#endi
|
||||||
return -1
|
#if $data11 != 10 then
|
||||||
endi
|
# return -1
|
||||||
if $data11 > 15 then
|
#endi
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data11 < 5 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step7
|
#print =============== step7
|
||||||
$cc = 4 * 60000
|
#$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
#$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms interval(1m)
|
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms interval(1m)
|
||||||
print ===> $rows
|
#print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms interval(1m)
|
||||||
if $rows < 3 then
|
#print ===> $rows $data11
|
||||||
return -1
|
#if $rows != 5 then
|
||||||
endi
|
# return -1
|
||||||
if $rows > 7 then
|
#endi
|
||||||
return -1
|
#if $data11 != 10 then
|
||||||
endi
|
# return -1
|
||||||
if $data11 > 15 then
|
#endi
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data11 < 5 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step8
|
#print =============== step8
|
||||||
$cc = 40 * 60000
|
#$cc = 40 * 60000
|
||||||
$ms1 = 1601481600000 + $cc
|
#$ms1 = 1601481600000 + $cc
|
||||||
|
#
|
||||||
$cc = 1 * 60000
|
#$cc = 1 * 60000
|
||||||
$ms2 = 1601481600000 - $cc
|
#$ms2 = 1601481600000 - $cc
|
||||||
|
#
|
||||||
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m)
|
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m)
|
||||||
print ===> $rows
|
#print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m)
|
||||||
if $rows < 18 then
|
#print ===> $rows $data11
|
||||||
return -1
|
#if $rows != 20 then
|
||||||
endi
|
# return -1
|
||||||
if $rows > 22 then
|
#endi
|
||||||
return -1
|
#if $data11 != 10 then
|
||||||
endi
|
# return -1
|
||||||
if $data11 > 15 then
|
#endi
|
||||||
return -1
|
#
|
||||||
endi
|
#print =============== step9
|
||||||
if $data11 < 5 then
|
#$cc = 40 * 60000
|
||||||
return -1
|
#$ms1 = 1601481600000 + $cc
|
||||||
endi
|
#
|
||||||
|
#$cc = 1 * 60000
|
||||||
print =============== step9
|
#$ms2 = 1601481600000 - $cc
|
||||||
$cc = 40 * 60000
|
#
|
||||||
$ms1 = 1601481600000 + $cc
|
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m) fill(value, 0)
|
||||||
|
#print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m) fill(value, 0)
|
||||||
$cc = 1 * 60000
|
#print ===> $rows $data11
|
||||||
$ms2 = 1601481600000 - $cc
|
#if $rows != 42 then
|
||||||
|
# return -1
|
||||||
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m) fill(value, 0)
|
#endi
|
||||||
if $rows < 30 then
|
#if $data11 != 10 then
|
||||||
return -1
|
# return -1
|
||||||
endi
|
#endi
|
||||||
if $rows > 50 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data11 > 15 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data11 < 5 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
#sql drop database $db
|
||||||
sql show databases
|
#sql show databases
|
||||||
if $rows != 0 then
|
#if $rows != 0 then
|
||||||
return -1
|
# return -1
|
||||||
endi
|
#endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
Loading…
Reference in New Issue