提交 24ca420e 编写于 作者: wmmhello's avatar wmmhello

TD-6129<feature> add tag-> select logic

上级 e304faac
......@@ -4619,7 +4619,10 @@ static int32_t handleExprInQueryCond(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSql
// ret = setExprToCond(pCmd, &pCondExpr->pTagCond,
// *pExpr, NULL, parentOptr);
tSqlExpr *rexpr = NULL;
if ((*pExpr)->tokenId == TK_NE && (pSchema->type != TSDB_DATA_TYPE_BINARY && pSchema->type != TSDB_DATA_TYPE_NCHAR && pSchema->type != TSDB_DATA_TYPE_BOOL)) {
if ((*pExpr)->tokenId == TK_NE && (pSchema->type != TSDB_DATA_TYPE_BINARY
&& pSchema->type != TSDB_DATA_TYPE_NCHAR
&& pSchema->type != TSDB_DATA_TYPE_BOOL
&& pSchema->type != TSDB_DATA_TYPE_JSON)) {
handleNeOptr(&rexpr, *pExpr);
*pExpr = rexpr;
}
......@@ -6063,10 +6066,6 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
return invalidOperationMsg(pMsg, msg14);
}
if (pTagsSchema->type == TSDB_DATA_TYPE_JSON && (pItem->pVar.nLen > TSDB_MAX_TAGS_LEN)) {
return invalidOperationMsg(pMsg, msg14);
}
int32_t schemaLen = sizeof(STColumn) * numOfTags;
int32_t size = sizeof(SUpdateTableTagValMsg) + pTagsSchema->bytes + schemaLen + TSDB_EXTRA_PAYLOAD_SIZE;
......
......@@ -73,6 +73,7 @@ int32_t converToStr(char *str, int type, void *buf, int32_t bufSize, int32_t *le
case TSDB_DATA_TYPE_BINARY:
case TSDB_DATA_TYPE_NCHAR:
case TSDB_DATA_TYPE_JSON:
if (bufSize < 0) {
tscError("invalid buf size");
return TSDB_CODE_TSC_INVALID_VALUE;
......
......@@ -1531,7 +1531,7 @@ void filterDumpInfoToString(SFilterInfo *info, const char *msg, int32_t options)
if (unit->right.type == FLD_TYPE_VALUE && FILTER_UNIT_OPTR(unit) != TSDB_RELATION_IN) {
SFilterField *right = FILTER_UNIT_RIGHT_FIELD(info, unit);
char *data = right->data;
if (IS_VAR_DATA_TYPE(type)) {
if (IS_VAR_DATA_TYPE(type) || type == TSDB_DATA_TYPE_JSON) {
tlen = varDataLen(data);
data += VARSTR_HEADER_SIZE;
}
......@@ -1548,7 +1548,7 @@ void filterDumpInfoToString(SFilterInfo *info, const char *msg, int32_t options)
if (unit->right2.type == FLD_TYPE_VALUE && FILTER_UNIT_OPTR(unit) != TSDB_RELATION_IN) {
SFilterField *right = FILTER_UNIT_RIGHT2_FIELD(info, unit);
char *data = right->data;
if (IS_VAR_DATA_TYPE(type)) {
if (IS_VAR_DATA_TYPE(type) || type == TSDB_DATA_TYPE_JSON) {
tlen = varDataLen(data);
data += VARSTR_HEADER_SIZE;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册