fix: some problems of parser for stmt mode
This commit is contained in:
parent
463d7d16c0
commit
8eadd68218
|
@ -3446,7 +3446,11 @@ static int32_t extractQueryResultSchema(const SNodeList* pProjections, int32_t*
|
|||
(*pSchema)[index].type = pExpr->resType.type;
|
||||
(*pSchema)[index].bytes = pExpr->resType.bytes;
|
||||
(*pSchema)[index].colId = index + 1;
|
||||
if ('\0' != pExpr->userAlias[0]) {
|
||||
strcpy((*pSchema)[index].name, pExpr->userAlias);
|
||||
} else {
|
||||
strcpy((*pSchema)[index].name, pExpr->aliasName);
|
||||
}
|
||||
index += 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ static int32_t setValueByBindParam(SValueNode* pVal, TAOS_MULTI_BIND* pParam) {
|
|||
|
||||
static EDealRes rewriteQueryExprAliasImpl(SNode* pNode, void* pContext) {
|
||||
if (nodesIsExprNode(pNode) && QUERY_NODE_COLUMN != nodeType(pNode) && '\0' == ((SExprNode*)pNode)->userAlias[0]) {
|
||||
strcpy(((SExprNode*)pNode)->userAlias, ((SExprNode*)pNode)->aliasName);
|
||||
sprintf(((SExprNode*)pNode)->aliasName, "#%d", *(int32_t*)pContext);
|
||||
++(*(int32_t*)pContext);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue