提交 0b1abeb5 编写于 作者: H Haojun Liao

[TD-225]

上级 1faef886
...@@ -220,13 +220,16 @@ bool tscIsPointInterpQuery(SQueryInfo* pQueryInfo) { ...@@ -220,13 +220,16 @@ bool tscIsPointInterpQuery(SQueryInfo* pQueryInfo) {
} }
bool tscIsSecondStageQuery(SQueryInfo* pQueryInfo) { bool tscIsSecondStageQuery(SQueryInfo* pQueryInfo) {
size_t numOfOutput = tscNumOfFields(pQueryInfo); STableMetaInfo* pTableMetaInfo = pQueryInfo->pTableMetaInfo[0];
size_t numOfExprs = tscSqlExprNumOfExprs(pQueryInfo); if (UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo)) {
return false;
}
if (numOfOutput == numOfExprs) { if (tscIsProjectionQuery(pQueryInfo)) {
return false; return false;
} }
size_t numOfOutput = tscNumOfFields(pQueryInfo);
for(int32_t i = 0; i < numOfOutput; ++i) { for(int32_t i = 0; i < numOfOutput; ++i) {
SExprInfo* pExprInfo = tscFieldInfoGetInternalField(&pQueryInfo->fieldsInfo, i)->pArithExprInfo; SExprInfo* pExprInfo = tscFieldInfoGetInternalField(&pQueryInfo->fieldsInfo, i)->pArithExprInfo;
if (pExprInfo != NULL) { if (pExprInfo != NULL) {
...@@ -309,14 +312,14 @@ void tscSetResRawPtr(SSqlRes* pRes, SQueryInfo* pQueryInfo) { ...@@ -309,14 +312,14 @@ void tscSetResRawPtr(SSqlRes* pRes, SQueryInfo* pQueryInfo) {
assert(pInfo->pSqlExpr->param[1].nLen <= pInfo->field.bytes); assert(pInfo->pSqlExpr->param[1].nLen <= pInfo->field.bytes);
for (int32_t k = 0; k < pRes->numOfRows; ++k) { for (int32_t k = 0; k < pRes->numOfRows; ++k) {
char* p = pRes->urow[i] + k * pInfo->field.bytes; char* p = ((char**)pRes->urow)[i] + k * pInfo->field.bytes;
memcpy(varDataVal(p), pInfo->pSqlExpr->param[1].pz, pInfo->pSqlExpr->param[1].nLen); memcpy(varDataVal(p), pInfo->pSqlExpr->param[1].pz, pInfo->pSqlExpr->param[1].nLen);
varDataSetLen(p, pInfo->pSqlExpr->param[1].nLen); varDataSetLen(p, pInfo->pSqlExpr->param[1].nLen);
} }
} else { } else {
for (int32_t k = 0; k < pRes->numOfRows; ++k) { for (int32_t k = 0; k < pRes->numOfRows; ++k) {
char* p = pRes->urow[i] + k * pInfo->field.bytes; char* p = ((char**)pRes->urow)[i] + k * pInfo->field.bytes;
memcpy(p, &pInfo->pSqlExpr->param[1].i64Key, pInfo->field.bytes); memcpy(p, &pInfo->pSqlExpr->param[1].i64Key, pInfo->field.bytes);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册