[FEAT MERGE]4_1_sql_feature
Co-authored-by: leslieyuchen <leslieyuchen@gmail.com> Co-authored-by: Charles0429 <xiezhenjiang@gmail.com> Co-authored-by: raywill <hustos@gmail.com>
This commit is contained in:
@ -143,7 +143,8 @@ int ObMergeGroupByOp::init_rollup_distributor()
|
||||
int64_t row_count = child_->get_spec().rows_;
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_FAIL(inner_sort_.init(ctx_.get_my_session()->get_effective_tenant_id(),
|
||||
&MY_SPEC.sort_collations_, &MY_SPEC.sort_cmp_funcs_, &eval_ctx_, &ctx_,
|
||||
&MY_SPEC.sort_collations_, &MY_SPEC.sort_cmp_funcs_,
|
||||
&eval_ctx_, &ctx_,
|
||||
MY_SPEC.enable_encode_sort_, false, false /* need_rewind */))) {
|
||||
LOG_WARN("failed to init sort", K(ret));
|
||||
} else if (OB_FAIL(ObPxEstimateSizeUtil::get_px_size(&ctx_,
|
||||
@ -450,7 +451,7 @@ int ObMergeGroupByOp::collect_local_ndvs()
|
||||
if (OB_FAIL(expr->eval(eval_ctx_, datum))) {
|
||||
LOG_WARN("failed to eval expr", K(ret));
|
||||
} else {
|
||||
hash_value = expr->basic_funcs_->murmur_hash_(*datum, hash_value);
|
||||
hash_value = expr->basic_funcs_->murmur_hash_v2_(*datum, hash_value);
|
||||
if ((0 < n_group && i == n_group - 1) || i >= n_group) {
|
||||
if (0 < n_group) {
|
||||
ndv_calculator_[i - n_group + 1].set(hash_value);
|
||||
@ -478,9 +479,11 @@ int ObMergeGroupByOp::process_parallel_rollup_key(ObRollupNDVInfo &ndv_info)
|
||||
ObRollupKeyPieceMsg piece;
|
||||
piece.op_id_ = MY_SPEC.id_;
|
||||
piece.thread_id_ = GETTID();
|
||||
piece.dfo_id_ = proxy.get_dfo_id();
|
||||
piece.source_dfo_id_ = proxy.get_dfo_id();
|
||||
piece.target_dfo_id_ = proxy.get_dfo_id();
|
||||
piece.rollup_ndv_ = ndv_info;
|
||||
if (OB_FAIL(proxy.get_dh_msg(MY_SPEC.id_,
|
||||
dtl::DH_ROLLUP_KEY_WHOLE_MSG,
|
||||
piece,
|
||||
temp_whole_msg,
|
||||
ctx_.get_physical_plan_ctx()->get_timeout_timestamp()))) {
|
||||
@ -524,7 +527,7 @@ int ObMergeGroupBySpec::register_to_datahub(ObExecContext &ctx) const
|
||||
ObRollupKeyWholeMsg::WholeMsgProvider *provider =
|
||||
new (buf)ObRollupKeyWholeMsg::WholeMsgProvider();
|
||||
ObSqcCtx &sqc_ctx = ctx.get_sqc_handler()->get_sqc_ctx();
|
||||
if (OB_FAIL(sqc_ctx.add_whole_msg_provider(get_id(), *provider))) {
|
||||
if (OB_FAIL(sqc_ctx.add_whole_msg_provider(get_id(), dtl::DH_ROLLUP_KEY_WHOLE_MSG, *provider))) {
|
||||
LOG_WARN("fail add whole msg provider", K(ret));
|
||||
}
|
||||
}
|
||||
@ -815,10 +818,10 @@ int ObMergeGroupByOp::batch_collect_local_ndvs(const ObBatchRows *child_brs)
|
||||
bool is_batch_seed = (0 != i);
|
||||
ObDatum &curr_datum = expr->locate_batch_datums(eval_ctx_)[0];
|
||||
if (0 == i) {
|
||||
expr->basic_funcs_->murmur_hash_batch_(rollup_hash_vals_, &curr_datum, expr->is_batch_result(),
|
||||
expr->basic_funcs_->murmur_hash_v2_batch_(rollup_hash_vals_, &curr_datum, expr->is_batch_result(),
|
||||
*child_brs->skip_, child_brs->size_, &hash_value_seed, is_batch_seed);
|
||||
} else {
|
||||
expr->basic_funcs_->murmur_hash_batch_(rollup_hash_vals_, &curr_datum, expr->is_batch_result(),
|
||||
expr->basic_funcs_->murmur_hash_v2_batch_(rollup_hash_vals_, &curr_datum, expr->is_batch_result(),
|
||||
*child_brs->skip_, child_brs->size_, rollup_hash_vals_, is_batch_seed);
|
||||
}
|
||||
// whether it need skip???
|
||||
|
||||
Reference in New Issue
Block a user