diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index ef6c114acc983d082d92e0856385031d23718be2..960127b15df82d457f497de61d7d7be963d2416b 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -5943,7 +5943,7 @@ static void buildTableBlockDistResult(SQInfo *pQInfo) { type = blockDistSchema.type; } assert(type == TSDB_DATA_TYPE_BINARY); - STR_TO_VARSTR(pQuery->sdata[j]->data, (char *)(pTableBlockDist->result)); + STR_WITH_SIZE_TO_VARSTR(pQuery->sdata[j]->data, pTableBlockDist->result, (VarDataLenT)strlen(pTableBlockDist->result)); } freeTableBlockDist(pTableBlockDist);