From 83831a7e44e691b94282d0a6d44dde67484835c5 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 28 Oct 2021 15:40:42 +0800 Subject: [PATCH] support join for json tag --- src/query/src/qExecutor.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index e8cbc70a16..a0121898e7 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -7155,6 +7155,14 @@ static SSDataBlock* doTagScan(void* param, bool* newgroup) { data = tsdbGetTableName(item->pTable); } else { data = tsdbGetTableTagVal(item->pTable, pExprInfo->base.colInfo.colId, type, bytes); + if(type == TSDB_DATA_TYPE_JSON){ + if(pExprInfo->base.numOfParams > 0){ // tag-> operation + getJsonTagValueElment(item->pTable, pExprInfo->base.param[0].pz, pExprInfo->base.param[0].nLen, output, bytes); + }else{ + getJsonTagValueAll(data, output, bytes); + } + continue; + } } doSetTagValueToResultBuf(output, data, type, bytes); -- GitLab