rowsize issue

This commit is contained in:
dapan1121 2021-04-01 14:25:30 +08:00
parent e384c42a9d
commit b7e91f047a
1 changed files with 15 additions and 15 deletions

View File

@ -6385,27 +6385,27 @@ SQInfo* createQInfoImpl(SQueryTableMsg* pQueryMsg, SSqlGroupbyExpr* pGroupbyExpr
}
}
for (int16_t col = 0; col < numOfOutput; ++col) {
assert(pExprs[col].bytes > 0);
pQuery->resultRowSize += pExprs[col].bytes;
// keep the tag length
if (TSDB_COL_IS_TAG(pExprs[col].base.colInfo.flag)) {
pQuery->tagLen += pExprs[col].bytes;
}
}
if (pSecExprs != NULL) {
int32_t resultRowSize = 0;
// calculate the result row size
for (int16_t col = 0; col < pQuery->numOfExpr2; ++col) {
assert(pSecExprs[col].bytes > 0);
pQuery->resultRowSize += pSecExprs[col].bytes;
// keep the tag length
if (TSDB_COL_IS_TAG(pSecExprs[col].base.colInfo.flag)) {
pQuery->tagLen += pSecExprs[col].bytes;
}
resultRowSize += pSecExprs[col].bytes;
}
} else {
// calculate the result row size
for (int16_t col = 0; col < numOfOutput; ++col) {
assert(pExprs[col].bytes > 0);
pQuery->resultRowSize += pExprs[col].bytes;
// keep the tag length
if (TSDB_COL_IS_TAG(pExprs[col].base.colInfo.flag)) {
pQuery->tagLen += pExprs[col].bytes;
}
if (resultRowSize > pQuery->resultRowSize) {
pQuery->resultRowSize = resultRowSize;
}
}