[SCN] fix farm failure

This commit is contained in:
obdev
2022-11-28 02:58:33 +00:00
committed by ob-robot
parent 87a9357186
commit 51de5b5911
594 changed files with 9722 additions and 7770 deletions

View File

@ -2126,18 +2126,23 @@ int ObAggregateProcessor::prepare_aggr_result(const ObChunkDatumStore::StoredRow
LOG_WARN("fail to add row", K(ret));
} else {
if (aggr_fun == T_FUN_JSON_ARRAYAGG || aggr_fun == T_FUN_JSON_OBJECTAGG) {
int64_t len = param_exprs->count();
if (OB_FAIL(extra->reserve_bool_mark_count(len))) {
LOG_WARN("reserve_bool_mark_count failed", K(ret), K(len));
}
for (int64_t i = 0; OB_SUCC(ret) && i < len; i++) {
ObExpr *tmp = NULL;
if (OB_FAIL(param_exprs->at(i, tmp))){
LOG_WARN("fail to get param_exprs[i]", K(ret));
} else {
bool is_bool = (tmp->is_boolean_ == 1);
if (OB_FAIL(extra->set_bool_mark(i, is_bool))){
LOG_WARN("fail to set_bool_mark", K(ret));
if (param_exprs == NULL) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("param sexprs not be null", K(ret));
} else {
int64_t len = param_exprs->count();
if (OB_FAIL(extra->reserve_bool_mark_count(len))) {
LOG_WARN("reserve_bool_mark_count failed", K(ret), K(len));
}
for (int64_t i = 0; OB_SUCC(ret) && i < len; i++) {
ObExpr *tmp = NULL;
if (OB_FAIL(param_exprs->at(i, tmp))){
LOG_WARN("fail to get param_exprs[i]", K(ret));
} else {
bool is_bool = (tmp->is_boolean_ == 1);
if (OB_FAIL(extra->set_bool_mark(i, is_bool))){
LOG_WARN("fail to set_bool_mark", K(ret));
}
}
}
}

View File

@ -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);

View File

@ -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 {