[FEAT MERGE] impl vectorization 2.0
Co-authored-by: Naynahs <cfzy002@126.com> Co-authored-by: hwx65 <1780011298@qq.com> Co-authored-by: oceanoverflow <oceanoverflow@gmail.com>
This commit is contained in:
@ -28,6 +28,7 @@
|
||||
#include "sql/engine/px/exchange/ob_px_transmit_op.h"
|
||||
#include "sql/engine/px/exchange/ob_px_receive_op.h"
|
||||
#include "sql/engine/basic/ob_temp_table_insert_op.h"
|
||||
#include "sql/engine/basic/ob_temp_table_insert_vec_op.h"
|
||||
#include "sql/engine/dml/ob_table_insert_op.h"
|
||||
#include "sql/engine/join/ob_hash_join_op.h"
|
||||
#include "sql/engine/window_function/ob_window_function_op.h"
|
||||
@ -35,6 +36,7 @@
|
||||
#include "sql/engine/pdml/static/ob_px_multi_part_insert_op.h"
|
||||
#include "sql/engine/join/ob_join_filter_op.h"
|
||||
#include "sql/engine/px/ob_granule_pump.h"
|
||||
#include "sql/engine/join/hash_join/ob_hash_join_vec_op.h"
|
||||
#include "observer/mysql/obmp_base.h"
|
||||
#include "lib/alloc/ob_malloc_callback.h"
|
||||
|
||||
@ -679,6 +681,23 @@ int ObPxTaskProcess::OpPreparation::apply(ObExecContext &ctx,
|
||||
input->sqc_id_ = sqc_id_;
|
||||
input->dfo_id_ = dfo_id_;
|
||||
}
|
||||
} else if (PHY_VEC_TEMP_TABLE_INSERT == op.type_) {
|
||||
ObOperatorKit *kit = ctx.get_operator_kit(op.id_);
|
||||
if (OB_ISNULL(kit) || OB_ISNULL(kit->op_) || OB_ISNULL(kit->input_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("operator is NULL", K(ret), KP(kit));
|
||||
} else if (PHY_VEC_TEMP_TABLE_INSERT != kit->spec_->type_) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("is not temp table insert operator", K(ret),
|
||||
"spec", kit->spec_);
|
||||
} else {
|
||||
ObTempTableInsertVecOp *insert_op = static_cast<ObTempTableInsertVecOp*>(kit->op_);
|
||||
insert_op->set_px_task(task_);
|
||||
ObTempTableInsertVecOpInput *input = static_cast<ObTempTableInsertVecOpInput *>(kit->input_);
|
||||
input->qc_id_ = NULL == task_ ? OB_INVALID_ID : task_->qc_id_;
|
||||
input->sqc_id_ = sqc_id_;
|
||||
input->dfo_id_ = dfo_id_;
|
||||
}
|
||||
} else if (PHY_HASH_JOIN == op.type_) {
|
||||
if (OB_ISNULL(kit->input_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
@ -694,6 +713,21 @@ int ObPxTaskProcess::OpPreparation::apply(ObExecContext &ctx,
|
||||
LOG_TRACE("debug pre apply info", K(task_id_), K(op.id_));
|
||||
}
|
||||
}
|
||||
} else if (PHY_VEC_HASH_JOIN == op.type_) {
|
||||
if (OB_ISNULL(kit->input_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("operator is NULL", K(ret), KP(kit));
|
||||
} else {
|
||||
ObHashJoinVecSpec &hj_spec = static_cast<ObHashJoinVecSpec&>(op);
|
||||
ObHashJoinVecInput *input = static_cast<ObHashJoinVecInput*>(kit->input_);
|
||||
if (OB_ISNULL(input)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("input not found for op", "op_id", op.id_, K(ret));
|
||||
} else if (hj_spec.is_shared_ht_) {
|
||||
input->set_task_id(task_id_);
|
||||
LOG_TRACE("debug pre apply info", K(task_id_), K(op.id_));
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -757,6 +791,23 @@ int ObPxTaskProcess::OpPostparation::apply(ObExecContext &ctx, ObOpSpec &op)
|
||||
LOG_TRACE("debug post apply info", K(ret_));
|
||||
}
|
||||
}
|
||||
} else if (PHY_VEC_HASH_JOIN == op.type_) {
|
||||
if (OB_ISNULL(kit->input_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("operator is NULL", K(ret), KP(kit));
|
||||
} else {
|
||||
ObHashJoinVecSpec &hj_spec = static_cast<ObHashJoinVecSpec&>(op);
|
||||
ObHashJoinVecInput *input = static_cast<ObHashJoinVecInput*>(kit->input_);
|
||||
if (OB_ISNULL(input)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("input not found for op", "op_id", op.id_, K(ret));
|
||||
} else if (hj_spec.is_shared_ht_ && OB_SUCCESS != ret_) {
|
||||
input->set_error_code(ret_);
|
||||
LOG_TRACE("debug post apply info", K(ret_));
|
||||
} else {
|
||||
LOG_TRACE("debug post apply info", K(ret_));
|
||||
}
|
||||
}
|
||||
} else if (PHY_WINDOW_FUNCTION == op.type_) {
|
||||
if (OB_ISNULL(kit->input_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
|
||||
Reference in New Issue
Block a user