Merge pull request #15520 from taosdata/szhou/fix/udf
fix: compare scan target and agg target when tag scan optimize
This commit is contained in:
commit
9c82bdb9fa
|
@ -2271,7 +2271,7 @@ static int32_t tagScanOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSubp
|
||||||
FOREACH(pAggTarget, pAgg->pTargets) {
|
FOREACH(pAggTarget, pAgg->pTargets) {
|
||||||
SNode* pScanTarget = NULL;
|
SNode* pScanTarget = NULL;
|
||||||
FOREACH(pScanTarget, pScanNode->node.pTargets) {
|
FOREACH(pScanTarget, pScanNode->node.pTargets) {
|
||||||
if (0 == strcmp(((SColumnNode*)pAggTarget)->colName, ((SColumnNode*)pAggTarget)->colName)) {
|
if (0 == strcmp(((SColumnNode*)pAggTarget)->colName, ((SColumnNode*)pScanTarget)->colName)) {
|
||||||
nodesListAppend(pScanTargets, nodesCloneNode(pScanTarget));
|
nodesListAppend(pScanTargets, nodesCloneNode(pScanTarget));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,8 +360,9 @@ endi
|
||||||
if $data04 != @abc0@ then
|
if $data04 != @abc0@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
print "really this line"
|
||||||
sql select distinct tbname,t1,t2 from select_tags_mt0;
|
sql select distinct tbname,t1,t2 from select_tags_mt0 order by tbname;
|
||||||
|
print $data00 $data01 $data02 $data10 $data111 $data12
|
||||||
if $row != 16 then
|
if $row != 16 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
@ -390,7 +391,7 @@ if $data12 != @abc1@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select tbname,ts from select_tags_mt0;
|
sql select tbname,ts from select_tags_mt0 order by ts;
|
||||||
if $row != 12800 then
|
if $row != 12800 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
Loading…
Reference in New Issue