From 9b7b98fdfb59dc1e71a61e7938100d31d79827d2 Mon Sep 17 00:00:00 2001 From: xufei Date: Wed, 19 May 2021 20:41:54 +0800 Subject: [PATCH 1/8] support cross broadcast join --- planner/core/exhaust_physical_plans.go | 11 ++++++++++- session/session.go | 2 ++ sessionctx/variable/session.go | 13 +++++++++++++ sessionctx/variable/sysvar.go | 2 ++ sessionctx/variable/tidb_vars.go | 6 ++++++ 5 files changed, 33 insertions(+), 1 deletion(-) diff --git a/planner/core/exhaust_physical_plans.go b/planner/core/exhaust_physical_plans.go index e7d98c133a183..fa77f9d9ec09b 100644 --- a/planner/core/exhaust_physical_plans.go +++ b/planner/core/exhaust_physical_plans.go @@ -1636,6 +1636,9 @@ func (p *LogicalJoin) shouldUseMPPBCJ() bool { if p.ctx.GetSessionVars().BroadcastJoinThresholdSize == 0 || p.ctx.GetSessionVars().BroadcastJoinThresholdCount == 0 { return p.ctx.GetSessionVars().AllowBCJ } + if p.JoinType == InnerJoin && len(p.EqualConditions) == 0 && p.ctx.GetSessionVars().ForceCARTESIANJoinAsBCJ { + return true + } if p.JoinType == LeftOuterJoin || p.JoinType == SemiJoin || p.JoinType == AntiSemiJoin { return checkChildFitBC(p.children[1]) } else if p.JoinType == RightOuterJoin { @@ -1744,9 +1747,15 @@ func (p *LogicalJoin) tryToGetMppHashJoin(prop *property.PhysicalProperty, useBC return nil } - if (p.JoinType != InnerJoin && p.JoinType != LeftOuterJoin && p.JoinType != RightOuterJoin && p.JoinType != SemiJoin && p.JoinType != AntiSemiJoin) || len(p.EqualConditions) == 0 { + if p.JoinType != InnerJoin && p.JoinType != LeftOuterJoin && p.JoinType != RightOuterJoin && p.JoinType != SemiJoin && p.JoinType != AntiSemiJoin { return nil } + + if len(p.EqualConditions) == 0 { + if p.JoinType != InnerJoin || !p.ctx.GetSessionVars().AllowCARTESIANBCJ || !useBCJ { + return nil + } + } if prop.PartitionTp == property.BroadcastType { return nil } diff --git a/session/session.go b/session/session.go index 96f0538acaf61..36536f6702986 100644 --- a/session/session.go +++ b/session/session.go @@ -2504,6 +2504,8 @@ var builtinGlobalVariable = []string{ variable.TiDBAllowBatchCop, variable.TiDBAllowMPPExecution, variable.TiDBOptBCJ, + variable.TiDBOptCARTESIANBCJ, + variable.TiDBOptForceCARTESIANBCJ, variable.TiDBBCJThresholdSize, variable.TiDBBCJThresholdCount, variable.TiDBRowFormatVersion, diff --git a/sessionctx/variable/session.go b/sessionctx/variable/session.go index 82546fd553d65..3130296d41191 100644 --- a/sessionctx/variable/session.go +++ b/sessionctx/variable/session.go @@ -482,6 +482,13 @@ type SessionVars struct { // AllowBCJ means allow broadcast join. AllowBCJ bool + + // AllowCARTESIANBCJ means allow broadcast join for CARTESIAN join + AllowCARTESIANBCJ bool + + // ForceCARTESIANJoinAsBCJ means always allow broadcast join for CARTESIAN join without size check + ForceCARTESIANJoinAsBCJ bool + // AllowDistinctAggPushDown can be set true to allow agg with distinct push down to tikv/tiflash. AllowDistinctAggPushDown bool @@ -953,6 +960,8 @@ func NewSessionVars() *SessionVars { StmtCtx: new(stmtctx.StatementContext), AllowAggPushDown: false, AllowBCJ: false, + AllowCARTESIANBCJ: false, + ForceCARTESIANJoinAsBCJ: false, BroadcastJoinThresholdSize: DefBroadcastJoinThresholdSize, BroadcastJoinThresholdCount: DefBroadcastJoinThresholdSize, OptimizerSelectivityLevel: DefTiDBOptimizerSelectivityLevel, @@ -1438,6 +1447,10 @@ func (s *SessionVars) SetSystemVar(name string, val string) error { s.AllowAggPushDown = TiDBOptOn(val) case TiDBOptBCJ: s.AllowBCJ = TiDBOptOn(val) + case TiDBOptCARTESIANBCJ: + s.AllowCARTESIANBCJ = TiDBOptOn(val) + case TiDBOptForceCARTESIANBCJ: + s.ForceCARTESIANJoinAsBCJ = TiDBOptOn(val) case TiDBBCJThresholdSize: s.BroadcastJoinThresholdSize = tidbOptInt64(val, DefBroadcastJoinThresholdSize) case TiDBBCJThresholdCount: diff --git a/sessionctx/variable/sysvar.go b/sessionctx/variable/sysvar.go index 29a073936645c..9eb7b7dab0dd2 100644 --- a/sessionctx/variable/sysvar.go +++ b/sessionctx/variable/sysvar.go @@ -591,6 +591,8 @@ var defaultSysVars = []*SysVar{ } return normalizedValue, nil }}, + {Scope: ScopeGlobal | ScopeSession, Name: TiDBOptCARTESIANBCJ, Value: BoolToOnOff(DefOptCARTESIANBCJ), Type: TypeBool}, + {Scope: ScopeGlobal | ScopeSession, Name: TiDBOptForceCARTESIANBCJ, Value: BoolToOnOff(DefOptForceCARTESIANBCJ), Type: TypeBool}, {Scope: ScopeSession, Name: TiDBOptDistinctAggPushDown, Value: BoolToOnOff(config.GetGlobalConfig().Performance.DistinctAggPushDown), Type: TypeBool}, {Scope: ScopeSession, Name: TiDBOptWriteRowID, Value: BoolToOnOff(DefOptWriteRowID)}, {Scope: ScopeGlobal | ScopeSession, Name: TiDBBuildStatsConcurrency, Value: strconv.Itoa(DefBuildStatsConcurrency)}, diff --git a/sessionctx/variable/tidb_vars.go b/sessionctx/variable/tidb_vars.go index 144d09a52d929..f3dd54a92a698 100644 --- a/sessionctx/variable/tidb_vars.go +++ b/sessionctx/variable/tidb_vars.go @@ -48,6 +48,10 @@ const ( TiDBOptAggPushDown = "tidb_opt_agg_push_down" TiDBOptBCJ = "tidb_opt_broadcast_join" + + TiDBOptCARTESIANBCJ = "tidb_opt_cartesian_bcj" + + TiDBOptForceCARTESIANBCJ = "tidb_opt_force_cartesian_bcj" // tidb_opt_distinct_agg_push_down is used to decide whether agg with distinct should be pushed to tikv/tiflash. TiDBOptDistinctAggPushDown = "tidb_opt_distinct_agg_push_down" @@ -566,6 +570,8 @@ const ( DefSkipASCIICheck = false DefOptAggPushDown = false DefOptBCJ = false + DefOptCARTESIANBCJ = false + DefOptForceCARTESIANBCJ = false DefOptWriteRowID = false DefOptCorrelationThreshold = 0.9 DefOptCorrelationExpFactor = 1 From c1a802fc6fbe147ac8bf2bf031e6b2683a2e1e6b Mon Sep 17 00:00:00 2001 From: xufei Date: Fri, 21 May 2021 22:51:07 +0800 Subject: [PATCH 2/8] save work --- planner/core/exhaust_physical_plans.go | 2 +- planner/core/plan.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/planner/core/exhaust_physical_plans.go b/planner/core/exhaust_physical_plans.go index fa77f9d9ec09b..8d2cfb1bc9f90 100644 --- a/planner/core/exhaust_physical_plans.go +++ b/planner/core/exhaust_physical_plans.go @@ -1752,7 +1752,7 @@ func (p *LogicalJoin) tryToGetMppHashJoin(prop *property.PhysicalProperty, useBC } if len(p.EqualConditions) == 0 { - if p.JoinType != InnerJoin || !p.ctx.GetSessionVars().AllowCARTESIANBCJ || !useBCJ { + if !p.ctx.GetSessionVars().AllowCARTESIANBCJ || !useBCJ { return nil } } diff --git a/planner/core/plan.go b/planner/core/plan.go index bc3df257a3ba9..f1449491c3cab 100644 --- a/planner/core/plan.go +++ b/planner/core/plan.go @@ -391,9 +391,9 @@ func (p *basePhysicalPlan) cloneWithSelf(newSelf PhysicalPlan) (*basePhysicalPla base.children = append(base.children, cloned) } for _, prop := range p.childrenReqProps { - if prop == nil { - continue - } + if prop == nil { + continue + } base.childrenReqProps = append(base.childrenReqProps, prop.CloneEssentialFields()) } return base, nil From ac860448747357e0651fd4beb47ae3d92979dd0c Mon Sep 17 00:00:00 2001 From: xufei Date: Fri, 21 May 2021 22:54:02 +0800 Subject: [PATCH 3/8] save work --- planner/core/exhaust_physical_plans.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planner/core/exhaust_physical_plans.go b/planner/core/exhaust_physical_plans.go index 8d2cfb1bc9f90..f879b1a01db57 100644 --- a/planner/core/exhaust_physical_plans.go +++ b/planner/core/exhaust_physical_plans.go @@ -1636,7 +1636,7 @@ func (p *LogicalJoin) shouldUseMPPBCJ() bool { if p.ctx.GetSessionVars().BroadcastJoinThresholdSize == 0 || p.ctx.GetSessionVars().BroadcastJoinThresholdCount == 0 { return p.ctx.GetSessionVars().AllowBCJ } - if p.JoinType == InnerJoin && len(p.EqualConditions) == 0 && p.ctx.GetSessionVars().ForceCARTESIANJoinAsBCJ { + if len(p.EqualConditions) == 0 && p.ctx.GetSessionVars().ForceCARTESIANJoinAsBCJ { return true } if p.JoinType == LeftOuterJoin || p.JoinType == SemiJoin || p.JoinType == AntiSemiJoin { From a6a8f806fd627966131e8e2c1041c0f8071044a3 Mon Sep 17 00:00:00 2001 From: xufei Date: Sat, 22 May 2021 13:14:57 +0800 Subject: [PATCH 4/8] support push down cartesian join to tiflash --- go.mod | 2 +- go.sum | 2 ++ planner/core/plan_to_pb.go | 43 +++++++++++++++++++++++++++----------- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 68189c102e02c..dae29be6de3ea 100644 --- a/go.mod +++ b/go.mod @@ -53,7 +53,7 @@ require ( github.com/pingcap/parser v0.0.0-20210325072920-0d17053a8a69 github.com/pingcap/sysutil v0.0.0-20210221112134-a07bda3bde99 github.com/pingcap/tidb-tools v4.0.9-0.20201127090955-2707c97b3853+incompatible - github.com/pingcap/tipb v0.0.0-20210326161441-1164ca065d1b + github.com/pingcap/tipb v0.0.0-20210522031117-09a46c1aff57 github.com/prometheus/client_golang v1.5.1 github.com/prometheus/client_model v0.2.0 github.com/prometheus/common v0.9.1 diff --git a/go.sum b/go.sum index b1f4dfd13788f..1ccd88dc72058 100644 --- a/go.sum +++ b/go.sum @@ -478,6 +478,8 @@ github.com/pingcap/tidb-tools v4.0.9-0.20201127090955-2707c97b3853+incompatible github.com/pingcap/tidb-tools v4.0.9-0.20201127090955-2707c97b3853+incompatible/go.mod h1:XGdcy9+yqlDSEMTpOXnwf3hiTeqrV6MN/u1se9N8yIM= github.com/pingcap/tipb v0.0.0-20210326161441-1164ca065d1b h1:sZHSH0mh8PcRbmZlsIqP7CEwnfFuBpmkGt5i9JStLWA= github.com/pingcap/tipb v0.0.0-20210326161441-1164ca065d1b/go.mod h1:nsEhnMokcn7MRqd2J60yxpn/ac3ZH8A6GOJ9NslabUo= +github.com/pingcap/tipb v0.0.0-20210522031117-09a46c1aff57 h1:9+GOQcAJ5xZkHe5u4znRB/3ldUpUJSBmoJO5UMTtUtU= +github.com/pingcap/tipb v0.0.0-20210522031117-09a46c1aff57/go.mod h1:nsEhnMokcn7MRqd2J60yxpn/ac3ZH8A6GOJ9NslabUo= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff --git a/planner/core/plan_to_pb.go b/planner/core/plan_to_pb.go index 185e750c0974c..bbaeac92ce5a7 100644 --- a/planner/core/plan_to_pb.go +++ b/planner/core/plan_to_pb.go @@ -366,7 +366,25 @@ func (p *PhysicalHashJoin) ToPB(ctx sessionctx.Context, storeType kv.StoreType) if err != nil { return nil, err } - otherConditions, err := expression.ExpressionsToPBList(sc, p.OtherConditions, client) + + var otherConditionsInJoin expression.CNFExprs + var otherEqConditionsFromIn expression.CNFExprs + if p.JoinType == AntiSemiJoin { + for _, condition := range p.OtherConditions { + if expression.IsEQCondFromIn(condition) { + otherEqConditionsFromIn = append(otherEqConditionsFromIn, condition) + } else { + otherConditionsInJoin = append(otherConditionsInJoin, condition) + } + } + } else { + otherConditionsInJoin = p.OtherConditions + } + otherConditions, err := expression.ExpressionsToPBList(sc, otherConditionsInJoin, client) + if err != nil { + return nil, err + } + otherEqConditions, err := expression.ExpressionsToPBList(sc, otherEqConditionsFromIn, client) if err != nil { return nil, err } @@ -397,17 +415,18 @@ func (p *PhysicalHashJoin) ToPB(ctx sessionctx.Context, storeType kv.StoreType) buildFiledTypes = append(buildFiledTypes, expression.ToPBFieldType(retType)) } join := &tipb.Join{ - JoinType: pbJoinType, - JoinExecType: tipb.JoinExecType_TypeHashJoin, - InnerIdx: int64(p.InnerChildIdx), - LeftJoinKeys: left, - RightJoinKeys: right, - ProbeTypes: probeFiledTypes, - BuildTypes: buildFiledTypes, - LeftConditions: leftConditions, - RightConditions: rightConditions, - OtherConditions: otherConditions, - Children: []*tipb.Executor{lChildren, rChildren}, + JoinType: pbJoinType, + JoinExecType: tipb.JoinExecType_TypeHashJoin, + InnerIdx: int64(p.InnerChildIdx), + LeftJoinKeys: left, + RightJoinKeys: right, + ProbeTypes: probeFiledTypes, + BuildTypes: buildFiledTypes, + LeftConditions: leftConditions, + RightConditions: rightConditions, + OtherConditions: otherConditions, + OtherEqConditionsFromIn: otherEqConditions, + Children: []*tipb.Executor{lChildren, rChildren}, } executorID := p.ExplainID().String() From 0529c027f8527f51f808d712044a9399eed7cff0 Mon Sep 17 00:00:00 2001 From: xufei Date: Sat, 22 May 2021 21:57:58 +0800 Subject: [PATCH 5/8] enable cartesian push down by default --- sessionctx/variable/session.go | 4 ++-- sessionctx/variable/tidb_vars.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sessionctx/variable/session.go b/sessionctx/variable/session.go index 3130296d41191..5aa9d25c86f91 100644 --- a/sessionctx/variable/session.go +++ b/sessionctx/variable/session.go @@ -960,8 +960,8 @@ func NewSessionVars() *SessionVars { StmtCtx: new(stmtctx.StatementContext), AllowAggPushDown: false, AllowBCJ: false, - AllowCARTESIANBCJ: false, - ForceCARTESIANJoinAsBCJ: false, + AllowCARTESIANBCJ: DefOptCARTESIANBCJ, + ForceCARTESIANJoinAsBCJ: DefOptForceCARTESIANBCJ, BroadcastJoinThresholdSize: DefBroadcastJoinThresholdSize, BroadcastJoinThresholdCount: DefBroadcastJoinThresholdSize, OptimizerSelectivityLevel: DefTiDBOptimizerSelectivityLevel, diff --git a/sessionctx/variable/tidb_vars.go b/sessionctx/variable/tidb_vars.go index f3dd54a92a698..448099f484e85 100644 --- a/sessionctx/variable/tidb_vars.go +++ b/sessionctx/variable/tidb_vars.go @@ -570,7 +570,7 @@ const ( DefSkipASCIICheck = false DefOptAggPushDown = false DefOptBCJ = false - DefOptCARTESIANBCJ = false + DefOptCARTESIANBCJ = true DefOptForceCARTESIANBCJ = false DefOptWriteRowID = false DefOptCorrelationThreshold = 0.9 From 318945f99d3a27b7acc3887cbaf786f7d1d6b334 Mon Sep 17 00:00:00 2001 From: xufei Date: Sun, 23 May 2021 11:43:51 +0800 Subject: [PATCH 6/8] refine --- planner/core/exhaust_physical_plans.go | 4 ++-- sessionctx/variable/session.go | 10 ++-------- sessionctx/variable/sysvar.go | 3 +-- sessionctx/variable/tidb_vars.go | 3 +-- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/planner/core/exhaust_physical_plans.go b/planner/core/exhaust_physical_plans.go index f879b1a01db57..9da3d74d64ccd 100644 --- a/planner/core/exhaust_physical_plans.go +++ b/planner/core/exhaust_physical_plans.go @@ -1636,7 +1636,7 @@ func (p *LogicalJoin) shouldUseMPPBCJ() bool { if p.ctx.GetSessionVars().BroadcastJoinThresholdSize == 0 || p.ctx.GetSessionVars().BroadcastJoinThresholdCount == 0 { return p.ctx.GetSessionVars().AllowBCJ } - if len(p.EqualConditions) == 0 && p.ctx.GetSessionVars().ForceCARTESIANJoinAsBCJ { + if len(p.EqualConditions) == 0 && p.ctx.GetSessionVars().AllowCARTESIANBCJ == 2 { return true } if p.JoinType == LeftOuterJoin || p.JoinType == SemiJoin || p.JoinType == AntiSemiJoin { @@ -1752,7 +1752,7 @@ func (p *LogicalJoin) tryToGetMppHashJoin(prop *property.PhysicalProperty, useBC } if len(p.EqualConditions) == 0 { - if !p.ctx.GetSessionVars().AllowCARTESIANBCJ || !useBCJ { + if p.ctx.GetSessionVars().AllowCARTESIANBCJ < 1 || !useBCJ { return nil } } diff --git a/sessionctx/variable/session.go b/sessionctx/variable/session.go index 5aa9d25c86f91..c3a263770691a 100644 --- a/sessionctx/variable/session.go +++ b/sessionctx/variable/session.go @@ -484,10 +484,7 @@ type SessionVars struct { AllowBCJ bool // AllowCARTESIANBCJ means allow broadcast join for CARTESIAN join - AllowCARTESIANBCJ bool - - // ForceCARTESIANJoinAsBCJ means always allow broadcast join for CARTESIAN join without size check - ForceCARTESIANJoinAsBCJ bool + AllowCARTESIANBCJ int // AllowDistinctAggPushDown can be set true to allow agg with distinct push down to tikv/tiflash. AllowDistinctAggPushDown bool @@ -961,7 +958,6 @@ func NewSessionVars() *SessionVars { AllowAggPushDown: false, AllowBCJ: false, AllowCARTESIANBCJ: DefOptCARTESIANBCJ, - ForceCARTESIANJoinAsBCJ: DefOptForceCARTESIANBCJ, BroadcastJoinThresholdSize: DefBroadcastJoinThresholdSize, BroadcastJoinThresholdCount: DefBroadcastJoinThresholdSize, OptimizerSelectivityLevel: DefTiDBOptimizerSelectivityLevel, @@ -1448,9 +1444,7 @@ func (s *SessionVars) SetSystemVar(name string, val string) error { case TiDBOptBCJ: s.AllowBCJ = TiDBOptOn(val) case TiDBOptCARTESIANBCJ: - s.AllowCARTESIANBCJ = TiDBOptOn(val) - case TiDBOptForceCARTESIANBCJ: - s.ForceCARTESIANJoinAsBCJ = TiDBOptOn(val) + s.AllowCARTESIANBCJ = int(tidbOptInt64(val, DefOptCARTESIANBCJ)) case TiDBBCJThresholdSize: s.BroadcastJoinThresholdSize = tidbOptInt64(val, DefBroadcastJoinThresholdSize) case TiDBBCJThresholdCount: diff --git a/sessionctx/variable/sysvar.go b/sessionctx/variable/sysvar.go index 9eb7b7dab0dd2..86b1c9900ef5d 100644 --- a/sessionctx/variable/sysvar.go +++ b/sessionctx/variable/sysvar.go @@ -591,8 +591,7 @@ var defaultSysVars = []*SysVar{ } return normalizedValue, nil }}, - {Scope: ScopeGlobal | ScopeSession, Name: TiDBOptCARTESIANBCJ, Value: BoolToOnOff(DefOptCARTESIANBCJ), Type: TypeBool}, - {Scope: ScopeGlobal | ScopeSession, Name: TiDBOptForceCARTESIANBCJ, Value: BoolToOnOff(DefOptForceCARTESIANBCJ), Type: TypeBool}, + {Scope: ScopeGlobal | ScopeSession, Name: TiDBOptCARTESIANBCJ, Value: strconv.Itoa(DefOptCARTESIANBCJ), Type: TypeInt, MinValue: 0, MaxValue: 2}, {Scope: ScopeSession, Name: TiDBOptDistinctAggPushDown, Value: BoolToOnOff(config.GetGlobalConfig().Performance.DistinctAggPushDown), Type: TypeBool}, {Scope: ScopeSession, Name: TiDBOptWriteRowID, Value: BoolToOnOff(DefOptWriteRowID)}, {Scope: ScopeGlobal | ScopeSession, Name: TiDBBuildStatsConcurrency, Value: strconv.Itoa(DefBuildStatsConcurrency)}, diff --git a/sessionctx/variable/tidb_vars.go b/sessionctx/variable/tidb_vars.go index 448099f484e85..ff4b62260f260 100644 --- a/sessionctx/variable/tidb_vars.go +++ b/sessionctx/variable/tidb_vars.go @@ -570,8 +570,7 @@ const ( DefSkipASCIICheck = false DefOptAggPushDown = false DefOptBCJ = false - DefOptCARTESIANBCJ = true - DefOptForceCARTESIANBCJ = false + DefOptCARTESIANBCJ = 1 DefOptWriteRowID = false DefOptCorrelationThreshold = 0.9 DefOptCorrelationExpFactor = 1 From 4c6523ef11d17f1f2d5ff3e3510e999556431a5b Mon Sep 17 00:00:00 2001 From: xufei Date: Sun, 23 May 2021 14:14:16 +0800 Subject: [PATCH 7/8] fix --- session/session.go | 1 - 1 file changed, 1 deletion(-) diff --git a/session/session.go b/session/session.go index 36536f6702986..337a0aadca576 100644 --- a/session/session.go +++ b/session/session.go @@ -2505,7 +2505,6 @@ var builtinGlobalVariable = []string{ variable.TiDBAllowMPPExecution, variable.TiDBOptBCJ, variable.TiDBOptCARTESIANBCJ, - variable.TiDBOptForceCARTESIANBCJ, variable.TiDBBCJThresholdSize, variable.TiDBBCJThresholdCount, variable.TiDBRowFormatVersion, From 9c290e5d12f00511d5f78502a58ebe25be04fc6a Mon Sep 17 00:00:00 2001 From: xufei Date: Sun, 23 May 2021 14:21:35 +0800 Subject: [PATCH 8/8] fix --- sessionctx/variable/tidb_vars.go | 1 - 1 file changed, 1 deletion(-) diff --git a/sessionctx/variable/tidb_vars.go b/sessionctx/variable/tidb_vars.go index ff4b62260f260..43b4c4977cba0 100644 --- a/sessionctx/variable/tidb_vars.go +++ b/sessionctx/variable/tidb_vars.go @@ -51,7 +51,6 @@ const ( TiDBOptCARTESIANBCJ = "tidb_opt_cartesian_bcj" - TiDBOptForceCARTESIANBCJ = "tidb_opt_force_cartesian_bcj" // tidb_opt_distinct_agg_push_down is used to decide whether agg with distinct should be pushed to tikv/tiflash. TiDBOptDistinctAggPushDown = "tidb_opt_distinct_agg_push_down"