feat(stream): partition by
This commit is contained in:
parent
03eca3072a
commit
22f86ee529
|
@ -582,6 +582,15 @@ int32_t* setupColumnOffset(const SSDataBlock* pBlock, int32_t rowCapacity) {
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void clearPartitionOperator(SPartitionOperatorInfo* pInfo) {
|
||||||
|
void *ite = NULL;
|
||||||
|
while( (ite = taosHashIterate(pInfo->pGroupSet, ite)) != NULL ) {
|
||||||
|
taosArrayDestroy( ((SDataGroupInfo *)ite)->pPageList);
|
||||||
|
}
|
||||||
|
taosHashClear(pInfo->pGroupSet);
|
||||||
|
clearDiskbasedBuf(pInfo->pBuf);
|
||||||
|
}
|
||||||
|
|
||||||
static SSDataBlock* buildPartitionResult(SOperatorInfo* pOperator) {
|
static SSDataBlock* buildPartitionResult(SOperatorInfo* pOperator) {
|
||||||
SPartitionOperatorInfo* pInfo = pOperator->info;
|
SPartitionOperatorInfo* pInfo = pOperator->info;
|
||||||
|
|
||||||
|
@ -591,6 +600,7 @@ static SSDataBlock* buildPartitionResult(SOperatorInfo* pOperator) {
|
||||||
pInfo->pGroupIter = taosHashIterate(pInfo->pGroupSet, pInfo->pGroupIter);
|
pInfo->pGroupIter = taosHashIterate(pInfo->pGroupSet, pInfo->pGroupIter);
|
||||||
if (pInfo->pGroupIter == NULL) {
|
if (pInfo->pGroupIter == NULL) {
|
||||||
doSetOperatorCompleted(pOperator);
|
doSetOperatorCompleted(pOperator);
|
||||||
|
clearPartitionOperator(pInfo);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue