[CP] fix bug of NO_GATHER_OPTIMIZER_STATISTICS no affect

This commit is contained in:
obdev
2024-02-09 01:46:18 +00:00
committed by ob-robot
parent 44879cf7d6
commit 4240f522b0
3 changed files with 27 additions and 3 deletions

View File

@ -78,6 +78,7 @@ int ObTableDirectInsertCtx::init(ObExecContext *exec_ctx,
param.max_error_row_count_ = 0;
param.dup_action_ = sql::ObLoadDupActionType::LOAD_STOP_ON_DUP;
param.sql_mode_ = sql_mode;
param.online_opt_stat_gather_ = is_online_gather_statistics_;
if (OB_FAIL(table_load_instance_->init(param, store_column_idxs, load_exec_ctx_))) {
LOG_WARN("failed to init direct loader", KR(ret));
} else {

View File

@ -33,7 +33,8 @@ public:
: load_exec_ctx_(nullptr),
table_load_instance_(nullptr),
is_inited_(false),
is_direct_(false) {}
is_direct_(false),
is_online_gather_statistics_(false) {}
~ObTableDirectInsertCtx();
TO_STRING_KV(K_(is_inited));
public:
@ -44,6 +45,13 @@ public:
bool get_is_direct() const { return is_direct_; }
void set_is_direct(bool is_direct) { is_direct_ = is_direct; }
bool get_is_online_gather_statistics() const {
return is_online_gather_statistics_;
}
void set_is_online_gather_statistics(const bool is_online_gather_statistics) {
is_online_gather_statistics_ = is_online_gather_statistics;
}
private:
int init_store_column_idxs(const uint64_t tenant_id, const uint64_t table_id,
@ -53,6 +61,7 @@ private:
observer::ObTableLoadInstance *table_load_instance_;
bool is_inited_;
bool is_direct_; //indict whether the plan is direct load plan including insert into append and load data direct
bool is_online_gather_statistics_;
};
} // namespace observer
} // namespace oceanbase