diff --git a/deps/oblib/src/lib/container/ob_mask_set2.h b/deps/oblib/src/lib/container/ob_mask_set2.h index c4f01f05f1..1e86c31234 100644 --- a/deps/oblib/src/lib/container/ob_mask_set2.h +++ b/deps/oblib/src/lib/container/ob_mask_set2.h @@ -58,9 +58,9 @@ public: } else { bool hit = false; for (int64_t i = 0 ; OB_SUCCESS == ret && i < array_->count(); i++) { - if (array_->at(i) == key) { - hit = true; - if (OB_FAIL(bitset_.add_member(i))) { + if (array_->at(i) == key) { + hit = true; + if (OB_FAIL(bitset_.add_member(i))) { } break; } @@ -108,9 +108,9 @@ public: if (array_->at(i) == key) { hit = true; if (bitset_.has_member(i)) { - tmp_new_mask = false; - } else if (OB_FAIL(bitset_.add_member(i))) { - } else { + tmp_new_mask = false; + } else if (OB_FAIL(bitset_.add_member(i))) { + } else { tmp_new_mask = true; } break; diff --git a/src/sql/engine/sort/ob_sort_op_impl.cpp b/src/sql/engine/sort/ob_sort_op_impl.cpp index e35f4e7b1d..12d0aec8ae 100644 --- a/src/sql/engine/sort/ob_sort_op_impl.cpp +++ b/src/sql/engine/sort/ob_sort_op_impl.cpp @@ -786,7 +786,9 @@ int ObSortOpImpl::init( op_monitor_info_->otherstat_2_value_ = 1; ObPhysicalPlanCtx *plan_ctx = NULL; const ObPhysicalPlan *phy_plan = nullptr; - if (OB_ISNULL(plan_ctx = GET_PHY_PLAN_CTX(*exec_ctx))) { + if (!exec_ctx->get_my_session()->get_ddl_info().is_ddl()) { + // not ddl + } else if (OB_ISNULL(plan_ctx = GET_PHY_PLAN_CTX(*exec_ctx))) { ret = OB_ERR_UNEXPECTED; LOG_WARN("deserialized exec ctx without phy plan ctx set. Unexpected", K(ret)); } else if (OB_ISNULL(phy_plan = plan_ctx->get_phy_plan())) {