fix: taosc crash caused of ordering by string

This commit is contained in:
dapan1121 2023-03-03 11:47:08 +08:00
parent 486fea65dc
commit f7a20af538
1 changed files with 4 additions and 0 deletions

View File

@ -2797,6 +2797,10 @@ static int32_t translateOrderBy(STranslateContext* pCxt, SSelectStmt* pSelect) {
bool other;
int32_t code = translateOrderByPosition(pCxt, pSelect->pProjectionList, pSelect->pOrderByList, &other);
if (TSDB_CODE_SUCCESS == code) {
if (0 == LIST_LENGTH(pSelect->pOrderByList)) {
NODES_DESTORY_LIST(pSelect->pOrderByList);
return TSDB_CODE_SUCCESS;
}
if (!other) {
return TSDB_CODE_SUCCESS;
}