diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index b0ad6d4a3c82bd89f1ce03146ae74685f3a39344..7e31118a90eb54ad3b5c0a04d9580416c0148eb4 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -4314,6 +4314,10 @@ static bool isValidExpr(tSqlExpr* pLeft, tSqlExpr* pRight, int32_t optr) { return false; } + if (pLeft->tokenId >= TK_BOOL && pLeft->tokenId <= TK_BINARY && (optr == TK_NOTNULL || optr == TK_ISNULL)) { + return false; + } + return true; } diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 107f630f3df2486eb3c3f1ed3a292693e77cf7dd..a1415c3ef80f0f7f046486d69c7faef83ecbf804 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -1054,7 +1054,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) { SCond *pCond = tsGetSTableQueryCond(pTagCond, pTableMeta->id.uid); if (pCond != NULL && pCond->cond != NULL) { - pQueryMsg->tagCondLen = htonl(pCond->len); + pQueryMsg->tagCondLen = htons(pCond->len); memcpy(pMsg, pCond->cond, pCond->len); pMsg += pCond->len;