[td-225]fix the bug found by regression test.
This commit is contained in:
parent
fdfb7b58f1
commit
9d217d864f
|
@ -1094,7 +1094,6 @@ SSDataBlock* doGlobalAggregate(void* param, bool* newgroup) {
|
|||
|
||||
{
|
||||
if (pAggInfo->hasDataBlockForNewGroup) {
|
||||
pAggInfo->binfo.pRes->info.rows = 0;
|
||||
pAggInfo->hasPrev = false; // now we start from a new group data set.
|
||||
|
||||
// not belongs to the same group, return the result of current group;
|
||||
|
|
|
@ -4578,9 +4578,12 @@ SArray* getOrderCheckColumns(SQueryAttr* pQuery) {
|
|||
for(int32_t i = 0; i < numOfCols; ++i) {
|
||||
SColIndex* index = taosArrayGet(pOrderColumns, i);
|
||||
for(int32_t j = 0; j < pQuery->numOfOutput; ++j) {
|
||||
if (index->colId == pQuery->pExpr1[j].base.colInfo.colId) {
|
||||
SSqlExpr* pExpr = &pQuery->pExpr1[j].base;
|
||||
int32_t functionId = pExpr->functionId;
|
||||
|
||||
if (index->colId == pExpr->colInfo.colId && (functionId == TSDB_FUNC_PRJ || functionId == TSDB_FUNC_TAG)) {
|
||||
index->colIndex = j;
|
||||
index->colId = pQuery->pExpr1[j].base.resColId;
|
||||
index->colId = pExpr->resColId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue