fix hash gby core when child batch_size == 0
This commit is contained in:
@ -245,9 +245,7 @@ int ObHashGroupByOp::inner_open()
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
if (is_vectorized()) {
|
||||
// child operator may disable vectorization and returns only 1 row
|
||||
int64_t max_size = (child_->get_spec().max_batch_size_ == 0)
|
||||
? 1 : child_->get_spec().max_batch_size_;
|
||||
int64_t max_size = MY_SPEC.max_batch_size_;
|
||||
int64_t mem_size = max_size * (sizeof(ObChunkDatumStore::StoredRow *)
|
||||
+ sizeof(uint64_t)
|
||||
+ sizeof(uint64_t)
|
||||
@ -332,8 +330,7 @@ int ObHashGroupByOp::inner_open()
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret) && is_vectorized()) {
|
||||
// child operator may disable vectorization and returns only 1 row
|
||||
int64_t max_size = (child_->get_spec().max_batch_size_ == 0) ? 1 : child_->get_spec().max_batch_size_;
|
||||
int64_t max_size = MY_SPEC.max_batch_size_;
|
||||
int64_t distinct_selector_pos = 0;
|
||||
int64_t distinct_hash_value_pos = distinct_selector_pos + max_size * sizeof(uint16_t);
|
||||
int64_t distinct_skip_pos = distinct_hash_value_pos + max_size * sizeof(uint64_t);
|
||||
|
||||
@ -161,8 +161,7 @@ int ObMergeGroupByOp::init_rollup_distributor()
|
||||
|
||||
// init hash values
|
||||
if (OB_SUCC(ret) && is_vectorized()) {
|
||||
int64_t max_size = (child_->get_spec().max_batch_size_ == 0)
|
||||
? 1 : child_->get_spec().max_batch_size_;
|
||||
int64_t max_size = MY_SPEC.max_batch_size_;
|
||||
int64_t rollup_hash_vals_pos = 0;
|
||||
int64_t sort_batch_skip_pos = rollup_hash_vals_pos + sizeof(uint64_t) * max_size;
|
||||
int64_t max_mem_size = sort_batch_skip_pos + ObBitVector::memory_size(max_size);
|
||||
@ -766,8 +765,7 @@ int ObMergeGroupByOp::get_child_next_batch_row(
|
||||
const_cast<ObBatchRows *>(batch_rows)->size_ = read_rows;
|
||||
const_cast<ObBatchRows *>(batch_rows)->end_ = false;
|
||||
if (first_batch_from_sort_) {
|
||||
int64_t max_size = (child_->get_spec().max_batch_size_ == 0)
|
||||
? 1 : child_->get_spec().max_batch_size_;
|
||||
int64_t max_size = MY_SPEC.max_batch_size_;
|
||||
const_cast<ObBatchRows *>(batch_rows)->skip_->reset(max_size);
|
||||
first_batch_from_sort_ = false;
|
||||
} else {
|
||||
|
||||
@ -835,7 +835,7 @@ int ObNestedLoopJoinOp::group_get_left_batch(const ObBatchRows *&left_brs)
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
int64_t read_size = 0;
|
||||
int64_t max_size = min(MY_SPEC.max_batch_size_, left_->get_spec().max_batch_size_);
|
||||
int64_t max_size = MY_SPEC.max_batch_size_;
|
||||
last_save_batch_.extend_save(eval_ctx_, max_size);
|
||||
if (OB_FAIL(left_store_iter_.get_next_batch(left_->get_spec().output_,
|
||||
eval_ctx_,
|
||||
|
||||
Reference in New Issue
Block a user