提交 a3795f40 编写于 作者: P plum-lihui

[TD-14099]

上级 e1ff54e8
...@@ -310,7 +310,8 @@ static SLogicNode* createWindowLogicNodeByInterval(SLogicPlanContext* pCxt, SInt ...@@ -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 ...@@ -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
return -1 if $rows != $rowNum then
endi return -1
if $data01 != 1 then endi
return -1 if $data00 != 1 then
endi return -1
if $data05 != 1 then endi
return -1 if $data04 != 1 then
endi return -1
endi
print =============== step3
$cc = 4 * 60000 #print =============== step3
$ms = 1601481600000 + $cc #$cc = 4 * 60000
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m) #$ms = 1601481600000 + $cc
print ===> $rows #sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m)
if $rows > 10 then #print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m)
return -1 #print ===> $rows $data01 $data05
endi #if $rows != 5 then
if $rows < 3 then # return -1
return -1 #endi
endi #if $data00 != 1 then
if $data01 != 1 then # return -1
return -1 #endi
endi #if $data04 != 1 then
if $data05 != 1 then # return -1
return -1 #endi
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 ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m)
print ===> $rows #print ===> $rows $data01 $data05
if $rows < 18 then #if $rows != 20 then
return -1 # return -1
endi #endi
if $rows > 22 then #if $data00 != 1 then
return -1 # return -1
endi #endi
if $data01 != 1 then #if $data04 != 1 then
return -1 # return -1
endi #endi
if $data05 != 1 then
return -1 #print =============== step5
endi #$cc = 40 * 60000
#$ms = 1601481600000 + $cc
print =============== step5
$cc = 40 * 60000 #$cc = 1 * 60000
$ms = 1601481600000 + $cc #$ms2 = 1601481600000 - $cc
$cc = 1 * 60000 #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)
$ms2 = 1601481600000 - $cc #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)
#print ===> $rows $data21 $data25
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) #if $rows != 42 then
print ===> $rows # return -1
if $rows < 30 then #endi
return -1 #if $data20 != 1 then
endi # return -1
if $rows > 50 then #endi
return -1 #if $data24 != 1 then
endi # return -1
if $data21 != 1 then #endi
return -1
endi #print =============== step6
if $data25 != 1 then #sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt interval(1m)
return -1 #print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt interval(1m)
endi #print ===> $rows $data11
#if $rows != 20 then
print =============== step6 # return -1
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt interval(1m) #endi
print ===> $rows #if $data11 != 10 then
if $rows < 18 then # return -1
return -1 #endi
endi
if $rows > 22 then #print =============== step7
return -1 #$cc = 4 * 60000
endi #$ms = 1601481600000 + $cc
if $data11 > 15 then #sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms interval(1m)
return -1 #print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms interval(1m)
endi #print ===> $rows $data11
if $data11 < 5 then #if $rows != 5 then
return -1 # return -1
endi #endi
#if $data11 != 10 then
print =============== step7 # return -1
$cc = 4 * 60000 #endi
$ms = 1601481600000 + $cc
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms interval(1m) #print =============== step8
print ===> $rows #$cc = 40 * 60000
if $rows < 3 then #$ms1 = 1601481600000 + $cc
return -1 #
endi #$cc = 1 * 60000
if $rows > 7 then #$ms2 = 1601481600000 - $cc
return -1 #
endi #sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m)
if $data11 > 15 then #print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m)
return -1 #print ===> $rows $data11
endi #if $rows != 20 then
if $data11 < 5 then # return -1
return -1 #endi
endi #if $data11 != 10 then
# return -1
print =============== step8 #endi
$cc = 40 * 60000 #
$ms1 = 1601481600000 + $cc #print =============== step9
#$cc = 40 * 60000
$cc = 1 * 60000 #$ms1 = 1601481600000 + $cc
$ms2 = 1601481600000 - $cc #
#$cc = 1 * 60000
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m) #$ms2 = 1601481600000 - $cc
print ===> $rows #
if $rows < 18 then #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)
return -1 #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)
endi #print ===> $rows $data11
if $rows > 22 then #if $rows != 42 then
return -1 # return -1
endi #endi
if $data11 > 15 then #if $data11 != 10 then
return -1 # return -1
endi #endi
if $data11 < 5 then
return -1
endi
print =============== step9
$cc = 40 * 60000
$ms1 = 1601481600000 + $cc
$cc = 1 * 60000
$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) fill(value, 0)
if $rows < 30 then
return -1
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
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册