Skip to content

Commit

Permalink
planner: seperate methods in PlanContext and EvalContext/`BuildCo…
Browse files Browse the repository at this point in the history
…ntext` (#51382)

close #51381
  • Loading branch information
lcwangchao authored Feb 28, 2024
1 parent 64d824a commit f1410bf
Show file tree
Hide file tree
Showing 55 changed files with 455 additions and 415 deletions.
16 changes: 13 additions & 3 deletions br/pkg/lightning/backend/kv/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ type planCtxImpl struct {
*planctximpl.PlanCtxExtendedImpl
}

type exprCtxImpl struct {
*Session
*exprctximpl.ExprCtxExtendedImpl
}

// Session is a trimmed down Session type which only wraps our own trimmed-down
// transaction type and provides the session variables to the TiDB library
// optimized for Lightning.
Expand All @@ -280,6 +285,7 @@ type Session struct {
planctx.EmptyPlanContextExtended
txn transaction
Vars *variable.SessionVars
exprCtx *exprCtxImpl
planctx *planCtxImpl
tblctx *tbctximpl.TableContextImpl
// currently, we only set `CommonAddRecordCtx`
Expand Down Expand Up @@ -342,11 +348,15 @@ func NewSession(options *encode.SessionOptions, logger log.Logger) *Session {
}
vars.TxnCtx = nil
s.Vars = vars
s.exprCtx = &exprCtxImpl{
Session: s,
ExprCtxExtendedImpl: exprctximpl.NewExprExtendedImpl(s),
}
s.planctx = &planCtxImpl{
Session: s,
PlanCtxExtendedImpl: planctximpl.NewPlanCtxExtendedImpl(s, exprctximpl.NewExprExtendedImpl(s)),
PlanCtxExtendedImpl: planctximpl.NewPlanCtxExtendedImpl(s),
}
s.tblctx = tbctximpl.NewTableContextImpl(s, s.planctx)
s.tblctx = tbctximpl.NewTableContextImpl(s, s.exprCtx)
s.txn.kvPairs = &Pairs{}

return s
Expand Down Expand Up @@ -381,7 +391,7 @@ func (se *Session) GetPlanCtx() planctx.PlanContext {

// GetExprCtx returns the expression context of the session.
func (se *Session) GetExprCtx() exprctx.BuildContext {
return se.planctx
return se.exprCtx
}

// GetTableCtx returns the table.MutateContext
Expand Down
2 changes: 1 addition & 1 deletion pkg/executor/aggfuncs/func_group_concat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func groupConcatOrderMultiArgsUpdateMemDeltaGens(ctx sessionctx.Context, srcChk
}
memDelta := int64(buffer.Cap() - oldMemSize)
for _, byItem := range byItems {
fdt, _ := byItem.Expr.Eval(ctx.GetPlanCtx(), row)
fdt, _ := byItem.Expr.Eval(ctx.GetExprCtx(), row)
datumMem := aggfuncs.GetDatumMemSize(&fdt)
memDelta += datumMem
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/executor/merge_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func (e *MergeJoinExec) compare(outerRow, innerRow chunk.Row) (int, error) {
outerJoinKeys := e.outerTable.joinKeys
innerJoinKeys := e.innerTable.joinKeys
for i := range outerJoinKeys {
cmp, _, err := e.compareFuncs[i](e.Ctx().GetPlanCtx(), outerJoinKeys[i], innerJoinKeys[i], outerRow, innerRow)
cmp, _, err := e.compareFuncs[i](e.Ctx().GetExprCtx(), outerJoinKeys[i], innerJoinKeys[i], outerRow, innerRow)
if err != nil {
return 0, err
}
Expand Down
22 changes: 11 additions & 11 deletions pkg/planner/cardinality/selectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func Selectivity(
ret = pseudoSelectivity(coll, exprs)
if sc.EnableOptimizerCETrace {
ceTraceExpr(ctx, tableID, "Table Stats-Pseudo-Expression",
expression.ComposeCNFCondition(ctx, exprs...), ret*float64(coll.RealtimeCount))
expression.ComposeCNFCondition(ctx.GetExprCtx(), exprs...), ret*float64(coll.RealtimeCount))
}
return ret, nil, nil
}
Expand Down Expand Up @@ -229,7 +229,7 @@ func Selectivity(
curExpr = append(curExpr, remainedExprs[i])
}
}
expr := expression.ComposeCNFCondition(ctx, curExpr...)
expr := expression.ComposeCNFCondition(ctx.GetExprCtx(), curExpr...)
ceTraceExpr(ctx, tableID, "Table Stats-Expression-CNF", expr, ret*float64(coll.RealtimeCount))
} else if sc.EnableOptimizerDebugTrace {
var strs []string
Expand Down Expand Up @@ -286,7 +286,7 @@ func Selectivity(

// Try to cover remaining Constants
for i, c := range notCoveredConstants {
if expression.MaybeOverOptimized4PlanCache(ctx, []expression.Expression{c}) {
if expression.MaybeOverOptimized4PlanCache(ctx.GetExprCtx(), []expression.Expression{c}) {
continue
}
if c.Value.IsNull() {
Expand Down Expand Up @@ -366,7 +366,7 @@ OUTER:
if sc.EnableOptimizerCETrace {
// Tracing for the expression estimation results after applying the DNF estimation result.
curExpr = append(curExpr, remainedExprs[i])
expr := expression.ComposeCNFCondition(ctx, curExpr...)
expr := expression.ComposeCNFCondition(ctx.GetExprCtx(), curExpr...)
ceTraceExpr(ctx, tableID, "Table Stats-Expression-CNF", expr, ret*float64(coll.RealtimeCount))
}
}
Expand Down Expand Up @@ -428,7 +428,7 @@ OUTER:

if sc.EnableOptimizerCETrace {
// Tracing for the expression estimation results after applying the default selectivity.
totalExpr := expression.ComposeCNFCondition(ctx, remainedExprs...)
totalExpr := expression.ComposeCNFCondition(ctx.GetExprCtx(), remainedExprs...)
ceTraceExpr(ctx, tableID, "Table Stats-Expression-CNF", totalExpr, ret*float64(coll.RealtimeCount))
}
return ret, nodes, nil
Expand Down Expand Up @@ -668,7 +668,7 @@ func findPrefixOfIndexByCol(ctx context.PlanContext, cols []*expression.Column,
idLoop:
for _, idCol := range idxCols {
for _, col := range cols {
if col.EqualByExprAndID(ctx, idCol) {
if col.EqualByExprAndID(ctx.GetExprCtx(), idCol) {
retCols = append(retCols, col)
continue idLoop
}
Expand Down Expand Up @@ -715,7 +715,7 @@ func getMaskAndRanges(ctx context.PlanContext, exprs []expression.Expression, ra
}
for i := range exprs {
for j := range accessConds {
if exprs[i].Equal(ctx, accessConds[j]) {
if exprs[i].Equal(ctx.GetExprCtx(), accessConds[j]) {
mask |= 1 << uint64(i)
break
}
Expand Down Expand Up @@ -745,7 +745,7 @@ func getMaskAndSelectivityForMVIndex(
var mask int64
for i := range exprs {
for _, accessCond := range accessConds {
if exprs[i].Equal(ctx, accessCond) {
if exprs[i].Equal(ctx.GetExprCtx(), accessCond) {
mask |= 1 << uint64(i)
break
}
Expand Down Expand Up @@ -841,7 +841,7 @@ func GetSelectivityByFilter(sctx context.PlanContext, coll *statistics.HistColl,
}
c.AppendDatum(0, &val)
}
selected, err = expression.VectorizedFilter(sctx, filters, chunk.NewIterator4Chunk(c), selected)
selected, err = expression.VectorizedFilter(sctx.GetExprCtx(), filters, chunk.NewIterator4Chunk(c), selected)
if err != nil {
return false, 0, err
}
Expand All @@ -858,7 +858,7 @@ func GetSelectivityByFilter(sctx context.PlanContext, coll *statistics.HistColl,
// The buckets lower bounds are used as random samples and are regarded equally.
if hist != nil && histTotalCnt > 0 {
selected = selected[:0]
selected, err = expression.VectorizedFilter(sctx, filters, chunk.NewIterator4Chunk(hist.Bounds), selected)
selected, err = expression.VectorizedFilter(sctx.GetExprCtx(), filters, chunk.NewIterator4Chunk(hist.Bounds), selected)
if err != nil {
return false, 0, err
}
Expand Down Expand Up @@ -892,7 +892,7 @@ func GetSelectivityByFilter(sctx context.PlanContext, coll *statistics.HistColl,
c.Reset()
c.AppendNull(0)
selected = selected[:0]
selected, err = expression.VectorizedFilter(sctx, filters, chunk.NewIterator4Chunk(c), selected)
selected, err = expression.VectorizedFilter(sctx.GetExprCtx(), filters, chunk.NewIterator4Chunk(c), selected)
if err != nil || len(selected) != 1 || !selected[0] {
nullSel = 0
} else {
Expand Down
4 changes: 2 additions & 2 deletions pkg/planner/cardinality/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (

// ceTraceExpr appends an expression and related information into CE trace
func ceTraceExpr(sctx context.PlanContext, tableID int64, tp string, expr expression.Expression, rowCount float64) {
exprStr, err := exprToString(sctx, expr)
exprStr, err := exprToString(sctx.GetExprCtx(), expr)
if err != nil {
logutil.BgLogger().Debug("Failed to trace CE of an expression", zap.String("category", "OptimizerTrace"),
zap.Any("expression", expr))
Expand All @@ -64,7 +64,7 @@ func ceTraceExpr(sctx context.PlanContext, tableID int64, tp string, expr expres
// It may be more appropriate to put this in expression package. But currently we only use it for CE trace,
//
// and it may not be general enough to handle all possible expressions. So we put it here for now.
func exprToString(ctx context.PlanContext, e expression.Expression) (string, error) {
func exprToString(ctx expression.EvalContext, e expression.Expression) (string, error) {
switch expr := e.(type) {
case *expression.ScalarFunction:
var buffer bytes.Buffer
Expand Down
48 changes: 24 additions & 24 deletions pkg/planner/cascades/transformation_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (*PushSelDownIndexScan) OnTransform(old *memo.ExprIter) (newExprs []*memo.G
// or the pushed down conditions are the same with before.
sameConds := true
for i := range res.AccessConds {
if !res.AccessConds[i].Equal(is.SCtx(), is.AccessConds[i]) {
if !res.AccessConds[i].Equal(is.SCtx().GetExprCtx(), is.AccessConds[i]) {
sameConds = false
break
}
Expand Down Expand Up @@ -331,7 +331,7 @@ func (*PushSelDownTiKVSingleGather) OnTransform(old *memo.ExprIter) (newExprs []
childGroup := old.Children[0].Children[0].Group
var pushed, remained []expression.Expression
sctx := sg.SCtx()
pushed, remained = expression.PushDownExprs(sctx, sel.Conditions, sctx.GetClient(), kv.TiKV)
pushed, remained = expression.PushDownExprs(sctx.GetExprCtx(), sel.Conditions, sctx.GetClient(), kv.TiKV)
if len(pushed) == 0 {
return nil, false, false, nil
}
Expand Down Expand Up @@ -551,7 +551,7 @@ func (*PushSelDownProjection) OnTransform(old *memo.ExprIter) (newExprs []*memo.
canNotBePushed := make([]expression.Expression, 0, len(sel.Conditions))
ctx := sel.SCtx()
for _, cond := range sel.Conditions {
substituted, hasFailed, newFilter := expression.ColumnSubstituteImpl(ctx, cond, projSchema, proj.Exprs, true)
substituted, hasFailed, newFilter := expression.ColumnSubstituteImpl(ctx.GetExprCtx(), cond, projSchema, proj.Exprs, true)
if substituted && !hasFailed && !expression.HasGetSetVarFunc(newFilter) {
canBePushed = append(canBePushed, newFilter)
} else {
Expand Down Expand Up @@ -870,8 +870,8 @@ func (*pushDownJoin) predicatePushDown(
tempCond = append(tempCond, expression.ScalarFuncs2Exprs(join.EqualConditions)...)
tempCond = append(tempCond, join.OtherConditions...)
tempCond = append(tempCond, predicates...)
tempCond = expression.ExtractFiltersFromDNFs(sctx, tempCond)
tempCond = expression.PropagateConstant(sctx, tempCond)
tempCond = expression.ExtractFiltersFromDNFs(sctx.GetExprCtx(), tempCond)
tempCond = expression.PropagateConstant(sctx.GetExprCtx(), tempCond)
// Return table dual when filter is constant false or null.
dual := plannercore.Conds2TableDual(join, tempCond)
if dual != nil {
Expand Down Expand Up @@ -902,9 +902,9 @@ func (*pushDownJoin) predicatePushDown(
copy(remainCond, predicates)
nullSensitive := join.JoinType == plannercore.AntiLeftOuterSemiJoin || join.JoinType == plannercore.LeftOuterSemiJoin
if join.JoinType == plannercore.RightOuterJoin {
joinConds, remainCond = expression.PropConstOverOuterJoin(join.SCtx(), joinConds, remainCond, rightSchema, leftSchema, nullSensitive)
joinConds, remainCond = expression.PropConstOverOuterJoin(join.SCtx().GetExprCtx(), joinConds, remainCond, rightSchema, leftSchema, nullSensitive)
} else {
joinConds, remainCond = expression.PropConstOverOuterJoin(join.SCtx(), joinConds, remainCond, leftSchema, rightSchema, nullSensitive)
joinConds, remainCond = expression.PropConstOverOuterJoin(join.SCtx().GetExprCtx(), joinConds, remainCond, leftSchema, rightSchema, nullSensitive)
}
eq, left, right, other := join.ExtractOnCondition(joinConds, leftSchema, rightSchema, false, false)
join.AppendJoinConds(eq, left, right, other)
Expand All @@ -914,7 +914,7 @@ func (*pushDownJoin) predicatePushDown(
return leftCond, rightCond, remainCond, dual
}
if join.JoinType == plannercore.RightOuterJoin {
remainCond = expression.ExtractFiltersFromDNFs(join.SCtx(), remainCond)
remainCond = expression.ExtractFiltersFromDNFs(join.SCtx().GetExprCtx(), remainCond)
// Only derive right where condition, because left where condition cannot be pushed down
equalCond, leftPushCond, rightPushCond, otherCond = join.ExtractOnCondition(remainCond, leftSchema, rightSchema, false, true)
rightCond = rightPushCond
Expand All @@ -925,7 +925,7 @@ func (*pushDownJoin) predicatePushDown(
remainCond = append(expression.ScalarFuncs2Exprs(equalCond), otherCond...)
remainCond = append(remainCond, leftPushCond...) // nozero
} else {
remainCond = expression.ExtractFiltersFromDNFs(join.SCtx(), remainCond)
remainCond = expression.ExtractFiltersFromDNFs(join.SCtx().GetExprCtx(), remainCond)
// Only derive left where condition, because right where condition cannot be pushed down
equalCond, leftPushCond, rightPushCond, otherCond = join.ExtractOnCondition(remainCond, leftSchema, rightSchema, true, false)
leftCond = leftPushCond
Expand Down Expand Up @@ -1313,7 +1313,7 @@ func (*PushTopNDownProjection) OnTransform(old *memo.ExprIter) (newExprs []*memo
newTopN.ByItems = make([]*util.ByItems, 0, len(topN.ByItems))
for _, by := range topN.ByItems {
newTopN.ByItems = append(newTopN.ByItems, &util.ByItems{
Expr: expression.ColumnSubstitute(ctx, by.Expr, old.Children[0].Group.Prop.Schema, proj.Exprs),
Expr: expression.ColumnSubstitute(ctx.GetExprCtx(), by.Expr, old.Children[0].Group.Prop.Schema, proj.Exprs),
Desc: by.Desc,
})
}
Expand Down Expand Up @@ -1459,7 +1459,7 @@ func (*MergeAdjacentTopN) Match(expr *memo.ExprIter) bool {
return false
}
for i := 0; i < len(topN.ByItems); i++ {
if !topN.ByItems[i].Equal(topN.SCtx(), child.ByItems[i]) {
if !topN.ByItems[i].Equal(topN.SCtx().GetExprCtx(), child.ByItems[i]) {
return false
}
}
Expand Down Expand Up @@ -1527,15 +1527,15 @@ func (*MergeAggregationProjection) OnTransform(old *memo.ExprIter) (newExprs []*
ctx := oldAgg.SCtx()
groupByItems := make([]expression.Expression, len(oldAgg.GroupByItems))
for i, item := range oldAgg.GroupByItems {
groupByItems[i] = expression.ColumnSubstitute(ctx, item, projSchema, proj.Exprs)
groupByItems[i] = expression.ColumnSubstitute(ctx.GetExprCtx(), item, projSchema, proj.Exprs)
}

aggFuncs := make([]*aggregation.AggFuncDesc, len(oldAgg.AggFuncs))
for i, aggFunc := range oldAgg.AggFuncs {
aggFuncs[i] = aggFunc.Clone()
newArgs := make([]expression.Expression, len(aggFunc.Args))
for j, arg := range aggFunc.Args {
newArgs[j] = expression.ColumnSubstitute(ctx, arg, projSchema, proj.Exprs)
newArgs[j] = expression.ColumnSubstitute(ctx.GetExprCtx(), arg, projSchema, proj.Exprs)
}
aggFuncs[i].Args = newArgs
}
Expand Down Expand Up @@ -1609,8 +1609,8 @@ func (r *EliminateSingleMaxMin) OnTransform(old *memo.ExprIter) (newExprs []*mem
// If it can be NULL, we need to filter NULL out first.
if !mysql.HasNotNullFlag(f.Args[0].GetType().GetFlag()) {
sel := plannercore.LogicalSelection{}.Init(ctx, agg.QueryBlockOffset())
isNullFunc := expression.NewFunctionInternal(ctx, ast.IsNull, types.NewFieldType(mysql.TypeTiny), f.Args[0])
notNullFunc := expression.NewFunctionInternal(ctx, ast.UnaryNot, types.NewFieldType(mysql.TypeTiny), isNullFunc)
isNullFunc := expression.NewFunctionInternal(ctx.GetExprCtx(), ast.IsNull, types.NewFieldType(mysql.TypeTiny), f.Args[0])
notNullFunc := expression.NewFunctionInternal(ctx.GetExprCtx(), ast.UnaryNot, types.NewFieldType(mysql.TypeTiny), isNullFunc)
sel.Conditions = []expression.Expression{notNullFunc}
selExpr := memo.NewGroupExpr(sel)
selExpr.SetChildren(childGroup)
Expand Down Expand Up @@ -2088,14 +2088,14 @@ func (r *TransformAggregateCaseToSelection) transform(agg *plannercore.LogicalAg
caseArgsNum := len(caseArgs)

// `case when a>0 then null else a end` should be converted to `case when !(a>0) then a else null end`.
var nullFlip = caseArgsNum == 3 && caseArgs[1].Equal(ctx, expression.NewNull()) && !caseArgs[2].Equal(ctx, expression.NewNull())
var nullFlip = caseArgsNum == 3 && caseArgs[1].Equal(ctx.GetExprCtx(), expression.NewNull()) && !caseArgs[2].Equal(ctx.GetExprCtx(), expression.NewNull())
// `case when a>0 then 0 else a end` should be converted to `case when !(a>0) then a else 0 end`.
var zeroFlip = !nullFlip && caseArgsNum == 3 && caseArgs[1].Equal(ctx, expression.NewZero())
var zeroFlip = !nullFlip && caseArgsNum == 3 && caseArgs[1].Equal(ctx.GetExprCtx(), expression.NewZero())

var outputIdx int
if nullFlip || zeroFlip {
outputIdx = 2
newConditions = []expression.Expression{expression.NewFunctionInternal(ctx, ast.UnaryNot, types.NewFieldType(mysql.TypeTiny), conditionFromCase)}
newConditions = []expression.Expression{expression.NewFunctionInternal(ctx.GetExprCtx(), ast.UnaryNot, types.NewFieldType(mysql.TypeTiny), conditionFromCase)}
} else {
outputIdx = 1
newConditions = expression.SplitCNFItems(conditionFromCase)
Expand All @@ -2107,7 +2107,7 @@ func (r *TransformAggregateCaseToSelection) transform(agg *plannercore.LogicalAg
// =>
// newAggFuncDesc: COUNT(DISTINCT y), newCondition: x = 'foo'

if aggFuncName == ast.AggFuncCount && r.isOnlyOneNotNull(ctx, caseArgs, caseArgsNum, outputIdx) {
if aggFuncName == ast.AggFuncCount && r.isOnlyOneNotNull(ctx.GetExprCtx(), caseArgs, caseArgsNum, outputIdx) {
newAggFuncDesc := aggFuncDesc.Clone()
newAggFuncDesc.Args = []expression.Expression{caseArgs[outputIdx]}
return true, newConditions, []*aggregation.AggFuncDesc{newAggFuncDesc}
Expand All @@ -2123,8 +2123,8 @@ func (r *TransformAggregateCaseToSelection) transform(agg *plannercore.LogicalAg
// => newAggFuncDesc: SUM(cnt), newCondition: x = 'foo'

switch {
case r.allowsSelection(aggFuncName) && (caseArgsNum == 2 || caseArgs[3-outputIdx].Equal(ctx, expression.NewNull())), // Case A1
aggFuncName == ast.AggFuncSum && caseArgsNum == 3 && caseArgs[3-outputIdx].Equal(ctx, expression.NewZero()): // Case A2
case r.allowsSelection(aggFuncName) && (caseArgsNum == 2 || caseArgs[3-outputIdx].Equal(ctx.GetExprCtx(), expression.NewNull())), // Case A1
aggFuncName == ast.AggFuncSum && caseArgsNum == 3 && caseArgs[3-outputIdx].Equal(ctx.GetExprCtx(), expression.NewZero()): // Case A2
newAggFuncDesc := aggFuncDesc.Clone()
newAggFuncDesc.Args = []expression.Expression{caseArgs[outputIdx]}
return true, newConditions, []*aggregation.AggFuncDesc{newAggFuncDesc}
Expand Down Expand Up @@ -2340,7 +2340,7 @@ func (*InjectProjectionBelowAgg) OnTransform(old *memo.ExprIter) (newExprs []*me
for _, aggFunc := range agg.AggFuncs {
copyFunc := aggFunc.Clone()
// WrapCastForAggArgs will modify AggFunc, so we should clone AggFunc.
copyFunc.WrapCastForAggArgs(agg.SCtx())
copyFunc.WrapCastForAggArgs(agg.SCtx().GetExprCtx())
copyFuncs = append(copyFuncs, copyFunc)
for _, arg := range copyFunc.Args {
_, isScalarFunc := arg.(*expression.ScalarFunction)
Expand Down Expand Up @@ -2542,8 +2542,8 @@ func (*MergeAdjacentWindow) Match(expr *memo.ExprIter) bool {

// Whether Partition, OrderBy and Frame parts are the same.
if !(curWinPlan.EqualPartitionBy(nextWinPlan) &&
curWinPlan.EqualOrderBy(ctx, nextWinPlan) &&
curWinPlan.EqualFrame(ctx, nextWinPlan)) {
curWinPlan.EqualOrderBy(ctx.GetExprCtx(), nextWinPlan) &&
curWinPlan.EqualFrame(ctx.GetExprCtx(), nextWinPlan)) {
return false
}

Expand Down
9 changes: 8 additions & 1 deletion pkg/planner/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,18 @@ import (

// PlanContext is the context for building plan.
type PlanContext interface {
exprctx.BuildContext
contextutil.ValueStoreContext
tablelock.TableLockReadContext
// GetExprCtx gets the expression context.
GetExprCtx() exprctx.BuildContext
// GetStore returns the store of session.
GetStore() kv.Storage
// GetSessionVars gets the session variables.
GetSessionVars() *variable.SessionVars
// GetDomainInfoSchema returns the latest information schema in domain
// Different with `domain.InfoSchema()`, the information schema returned by this method
// includes the temporary table definitions stored in session
GetDomainInfoSchema() infoschema.InfoSchemaMetaVersion
// GetInfoSchema returns the current infoschema
GetInfoSchema() infoschema.InfoSchemaMetaVersion
// UpdateColStatsUsage updates the column stats usage.
Expand Down
2 changes: 1 addition & 1 deletion pkg/planner/contextimpl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go_library(
importpath = "github.com/pingcap/tidb/pkg/planner/contextimpl",
visibility = ["//visibility:public"],
deps = [
"//pkg/expression/contextimpl",
"//pkg/expression/context",
"//pkg/planner/context",
"//pkg/sessionctx",
"//pkg/sessiontxn",
Expand Down
Loading

0 comments on commit f1410bf

Please sign in to comment.