From a93a49981daa63db098c1c008effc74acc0f5dde Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 28 Oct 2021 16:00:40 +0800 Subject: [PATCH] support join for json tag --- src/client/src/tscSQLParser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 65703f5b2e..f81bebae39 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -4025,7 +4025,7 @@ static int32_t checkAndSetJoinCondInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tS (*leftNode)->uid = pTableMetaInfo->pTableMeta->id.uid; (*leftNode)->tagColId = pTagSchema1->colId; - if(pLeft->tokenId == TK_ARROW) { + if(pExpr->pLeft->tokenId == TK_ARROW) { tstrncpy((*leftNode)->tagJsonKeyName, pExpr->pLeft->pRight->value.pz, TSDB_MAX_JSON_KEY_LEN + 1); } @@ -4062,7 +4062,7 @@ static int32_t checkAndSetJoinCondInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tS (*rightNode)->uid = pTableMetaInfo->pTableMeta->id.uid; (*rightNode)->tagColId = pTagSchema2->colId; - if(pRight->tokenId == TK_ARROW) { + if(pExpr->pRight->tokenId == TK_ARROW) { tstrncpy((*rightNode)->tagJsonKeyName, pRight->pLeft->pRight->value.pz, TSDB_MAX_JSON_KEY_LEN + 1); } -- GitLab