fix no spill size problem in parallel hash mod

This commit is contained in:
sqyyeah
2020-12-09 10:27:44 +08:00
parent ad9919e401
commit 5abcb2feb0
4 changed files with 11 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include "commands/tablespace.h"
#include "executor/execdebug.h"
#include "executor/hashjoin.h"
#include "utils/sharedtuplestore.h"
#include "executor/nodeHash.h"
#include "executor/nodeHashjoin.h"
#include "miscadmin.h"
@ -1782,6 +1783,8 @@ retry:
Assert(hashtable->batches[batchno].preallocated >= tuple_size);
hashtable->batches[batchno].preallocated -= tuple_size;
sts_puttuple(hashtable->batches[batchno].inner_tuples, &hashvalue, tuple);
hashtable->spill_count += 1;
*hashtable->spill_size += get_header_size(hashtable->batches[batchno].inner_tuples) + tuple->t_len;
}
++hashtable->batches[batchno].ntuples;
}