diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index b5960b9e58ff5da77c50cfd20e134880320380f7..9b356d57b81d56ad1db2df3a7806c0e7ccbbac59 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -1306,7 +1306,7 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SGroupbyOperatorInfo *pIn } if (IS_VAR_DATA_TYPE(type)) { - if(varDataLen(val) == varDataLen(pInfo->prevData) && memcmp(pInfo->prevData, val, varDataLen(val)) == 0) { + if(varDataLen(val) == varDataLen(pInfo->prevData) && memcmp(varDataVal(pInfo->prevData), varDataVal(val), varDataLen(val)) == 0) { num++; continue; }