diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index c2dfcef465d051a3f5ccd535771eb19f194f15a4..46edba98f11758d810575ccb8d793847f63f2ac0 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6876,7 +6876,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { tscError("json type error, should be string"); return invalidOperationMsg(pMsg, msg25); } - if (pItem->pVar.nType > TSDB_MAX_JSON_TAGS_LEN / TSDB_NCHAR_SIZE) { + if (pItem->pVar.nLen > TSDB_MAX_JSON_TAGS_LEN / TSDB_NCHAR_SIZE) { tscError("json tag too long"); return invalidOperationMsg(pMsg, msg14); }