partition_id_calc_type should reset after used
This commit is contained in:
@ -178,6 +178,7 @@ int ObRepartSliceIdxCalc::get_partition_id(ObEvalCtx& eval_ctx, int64_t& partiti
|
|||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
ObDatum* partition_id_datum = NULL;
|
ObDatum* partition_id_datum = NULL;
|
||||||
|
CalcTypeGuard calc_type_guard(eval_ctx.exec_ctx_);
|
||||||
if (OB_REPARTITION_ONE_SIDE_ONE_LEVEL_FIRST == repart_type_) {
|
if (OB_REPARTITION_ONE_SIDE_ONE_LEVEL_FIRST == repart_type_) {
|
||||||
eval_ctx.exec_ctx_.set_partition_id_calc_type(CALC_IGNORE_SUB_PART);
|
eval_ctx.exec_ctx_.set_partition_id_calc_type(CALC_IGNORE_SUB_PART);
|
||||||
} else if (OB_REPARTITION_ONE_SIDE_ONE_LEVEL_SUB == repart_type_) {
|
} else if (OB_REPARTITION_ONE_SIDE_ONE_LEVEL_SUB == repart_type_) {
|
||||||
|
|||||||
@ -135,6 +135,19 @@ public:
|
|||||||
typedef common::hash::ObHashMap<int64_t, int64_t, common::hash::NoPthreadDefendMode> PartId2ArrayIdxMap;
|
typedef common::hash::ObHashMap<int64_t, int64_t, common::hash::NoPthreadDefendMode> PartId2ArrayIdxMap;
|
||||||
typedef common::hash::ObHashMap<int64_t, int64_t, common::hash::NoPthreadDefendMode> SubPartId2ArrayIdxMap;
|
typedef common::hash::ObHashMap<int64_t, int64_t, common::hash::NoPthreadDefendMode> SubPartId2ArrayIdxMap;
|
||||||
|
|
||||||
|
class CalcTypeGuard {
|
||||||
|
public:
|
||||||
|
CalcTypeGuard(ObExecContext &exec_ctx) : exec_ctx_(exec_ctx)
|
||||||
|
{}
|
||||||
|
~CalcTypeGuard()
|
||||||
|
{
|
||||||
|
exec_ctx_.set_partition_id_calc_type(CALC_NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
ObExecContext &exec_ctx_;
|
||||||
|
};
|
||||||
|
|
||||||
virtual ~ObRepartSliceIdxCalc()
|
virtual ~ObRepartSliceIdxCalc()
|
||||||
{}
|
{}
|
||||||
virtual int get_slice_idx(const common::ObNewRow& row, int64_t& slice_idx) override;
|
virtual int get_slice_idx(const common::ObNewRow& row, int64_t& slice_idx) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user