[td-6563] refactor the code to improve the client-side performance.
This commit is contained in:
parent
f10ef79e5e
commit
da545a9974
|
@ -862,8 +862,8 @@ static int32_t serializeSqlExpr(SSqlExpr* pExpr, STableMetaInfo* pTableMetaInfo,
|
|||
|
||||
(*pMsg) += sizeof(SSqlExpr);
|
||||
for (int32_t j = 0; j < pExpr->numOfParams; ++j) { // todo add log
|
||||
pSqlExpr->param[j].nType = htons((uint16_t)pExpr->param[j].nType);
|
||||
pSqlExpr->param[j].nLen = htons(pExpr->param[j].nLen);
|
||||
pSqlExpr->param[j].nType = htonl(pExpr->param[j].nType);
|
||||
pSqlExpr->param[j].nLen = htonl(pExpr->param[j].nLen);
|
||||
|
||||
if (pExpr->param[j].nType == TSDB_DATA_TYPE_BINARY) {
|
||||
memcpy((*pMsg), pExpr->param[j].pz, pExpr->param[j].nLen);
|
||||
|
@ -954,7 +954,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
|
|||
pQueryMsg->sw.primaryColId = htonl(PRIMARYKEY_TIMESTAMP_COL_INDEX);
|
||||
|
||||
pQueryMsg->secondStageOutput = htonl(query.numOfExpr2);
|
||||
pQueryMsg->numOfOutput = htons((int16_t)query.numOfOutput); // this is the stage one output column number
|
||||
pQueryMsg->numOfOutput = htons((int16_t)query.numOfOutput); // this is the stage one output column number
|
||||
|
||||
pQueryMsg->numOfGroupCols = htons(pQueryInfo->groupbyExpr.numOfGroupCols);
|
||||
pQueryMsg->tagNameRelType = htons(pQueryInfo->tagCond.relType);
|
||||
|
@ -987,6 +987,8 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
|
|||
|
||||
pMsg += pCond->len;
|
||||
}
|
||||
} else {
|
||||
pQueryMsg->colCondLen = 0;
|
||||
}
|
||||
|
||||
for (int32_t i = 0; i < query.numOfOutput; ++i) {
|
||||
|
|
|
@ -7600,8 +7600,8 @@ int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SQueryParam* param) {
|
|||
pMsg += sizeof(SSqlExpr);
|
||||
|
||||
for (int32_t j = 0; j < pExprMsg->numOfParams; ++j) {
|
||||
pExprMsg->param[j].nType = htons(pExprMsg->param[j].nType);
|
||||
pExprMsg->param[j].nLen = htons(pExprMsg->param[j].nLen);
|
||||
pExprMsg->param[j].nType = htonl(pExprMsg->param[j].nType);
|
||||
pExprMsg->param[j].nLen = htonl(pExprMsg->param[j].nLen);
|
||||
|
||||
if (pExprMsg->param[j].nType == TSDB_DATA_TYPE_BINARY) {
|
||||
pExprMsg->param[j].pz = pMsg;
|
||||
|
@ -7648,8 +7648,8 @@ int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SQueryParam* param) {
|
|||
pMsg += sizeof(SSqlExpr);
|
||||
|
||||
for (int32_t j = 0; j < pExprMsg->numOfParams; ++j) {
|
||||
pExprMsg->param[j].nType = htons(pExprMsg->param[j].nType);
|
||||
pExprMsg->param[j].nLen = htons(pExprMsg->param[j].nLen);
|
||||
pExprMsg->param[j].nType = htonl(pExprMsg->param[j].nType);
|
||||
pExprMsg->param[j].nLen = htonl(pExprMsg->param[j].nLen);
|
||||
|
||||
if (pExprMsg->param[j].nType == TSDB_DATA_TYPE_BINARY) {
|
||||
pExprMsg->param[j].pz = pMsg;
|
||||
|
|
Loading…
Reference in New Issue