diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index f52f60db402b1a5055daaf14a81ee821905a48a6..8060bfc899d0d3f92bac151892e1f37c4f0fcd6e 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6701,6 +6701,10 @@ int32_t validateOrderbyNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSq return invalidOperationMsg(pMsgBuf, msg1); } + if (index.columnIndex == TSDB_TBNAME_COLUMN_INDEX) { + return invalidOperationMsg(pMsgBuf, msg1); + } + if (udf) { return invalidOperationMsg(pMsgBuf, msg11); }