未验证 提交 ee3fad82 编写于 作者: M Minglei Jin 提交者: GitHub

Merge pull request #15225 from taosdata/fix/TS-1693-2.4

fix: results for scalar functions with order by worked improperly
......@@ -1890,6 +1890,9 @@ static int32_t handleScalarTypeExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32
SExprInfo* pExpr = tscExprAppend(pQueryInfo, TSDB_FUNC_SCALAR_EXPR, &idx, pNode->resultType, pNode->resultBytes,
getNewResColId(pCmd), 0, false);
// set the colId to the result column id
pExpr->base.colInfo.colId = pExpr->base.resColId;
char* name = (pItem->aliasName != NULL)? pItem->aliasName:pItem->pNode->exprToken.z;
size_t len = MIN(sizeof(pExpr->base.aliasName), pItem->pNode->exprToken.n + 1);
tstrncpy(pExpr->base.aliasName, name, len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册