Change the rt exprs array source when in px batch rescan
This commit is contained in:
@ -860,7 +860,8 @@ int ObExecContext::get_pwj_map(PWJTabletIdMap *&pwj_map)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObExecContext::fill_px_batch_info(ObBatchRescanParams ¶ms, int64_t batch_id)
|
||||
int ObExecContext::fill_px_batch_info(ObBatchRescanParams ¶ms,
|
||||
int64_t batch_id, sql::ObExpr::ObExprIArray &array)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_ISNULL(phy_plan_ctx_)) {
|
||||
@ -872,7 +873,6 @@ int ObExecContext::fill_px_batch_info(ObBatchRescanParams ¶ms, int64_t batch
|
||||
} else {
|
||||
common::ObIArray<common::ObObjParam> &one_params =
|
||||
params.get_one_batch_params(batch_id);
|
||||
sql::ObExpr::ObExprIArray *array = sql::ObExpr::get_serialize_array();
|
||||
ObEvalCtx eval_ctx(*this);
|
||||
for (int i = 0; OB_SUCC(ret) && i < one_params.count(); ++i) {
|
||||
if (i > params.param_idxs_.count()) {
|
||||
@ -884,11 +884,11 @@ int ObExecContext::fill_px_batch_info(ObBatchRescanParams ¶ms, int64_t batch
|
||||
sql::ObExpr *expr = NULL;
|
||||
int64_t idx = params.param_expr_idxs_.at(i);
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_UNLIKELY(NULL == array) || OB_UNLIKELY(idx > array->count())) {
|
||||
} else if (OB_UNLIKELY(idx > array.count())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("expr index out of expr array range", K(ret), KP(array), K(idx), K(array->count()));
|
||||
LOG_WARN("expr index out of expr array range", K(ret), K(array), K(idx), K(array.count()));
|
||||
} else {
|
||||
expr = &array->at(idx - 1);
|
||||
expr = &array.at(idx - 1);
|
||||
expr->get_eval_info(eval_ctx).clear_evaluated_flag();
|
||||
ObDynamicParamSetter::clear_parent_evaluated_flag(eval_ctx, *expr);
|
||||
ObDatum ¶m_datum = expr->locate_datum_for_write(eval_ctx);
|
||||
|
||||
@ -429,7 +429,10 @@ public:
|
||||
const ObIArray<ObPxTabletRange> &get_partition_ranges() const { return part_ranges_; }
|
||||
int set_partition_ranges(const ObIArray<ObPxTabletRange> &part_ranges);
|
||||
int add_partition_range(ObPxTabletRange &part_range);
|
||||
int fill_px_batch_info(ObBatchRescanParams ¶ms, int64_t batch_id);
|
||||
int fill_px_batch_info(
|
||||
ObBatchRescanParams ¶ms,
|
||||
int64_t batch_id,
|
||||
sql::ObExpr::ObExprIArray &array);
|
||||
int64_t get_px_batch_id() { return px_batch_id_; }
|
||||
|
||||
ObDmlEventType get_dml_event() const { return dml_event_; }
|
||||
|
||||
@ -269,7 +269,8 @@ int ObPxTaskProcess::execute(ObOpSpec &root_spec)
|
||||
for (int i = 0; i < batch_count && OB_SUCC(ret); ++i) {
|
||||
if (need_fill_batch_info) {
|
||||
if (OB_FAIL(ctx.fill_px_batch_info(arg_.get_sqc_handler()->
|
||||
get_sqc_init_arg().sqc_.get_rescan_batch_params(), i))) {
|
||||
get_sqc_init_arg().sqc_.get_rescan_batch_params(), i,
|
||||
arg_.des_phy_plan_->get_expr_frame_info().rt_exprs_))) {
|
||||
LOG_WARN("fail to fill batch info", K(ret));
|
||||
} else if (OB_FAIL(arg_.get_sqc_handler()->get_sub_coord().
|
||||
get_sqc_ctx().gi_pump_.regenerate_gi_task())) {
|
||||
|
||||
Reference in New Issue
Block a user