MCPcopy
hub / github.com/pingcap/tidb / WithPlanCacheTracker

Function WithPlanCacheTracker

pkg/expression/exprstatic/exprctx.go:107–112  ·  view source on GitHub ↗

WithPlanCacheTracker sets the plan cache tracker for `ExprContext`.

(tracker *contextutil.PlanCacheTracker)

Source from the content-addressed store, hash-verified

105
106// WithPlanCacheTracker sets the plan cache tracker for `ExprContext`.
107func WithPlanCacheTracker(tracker *contextutil.PlanCacheTracker) ExprCtxOption {
108 intest.AssertNotNil(tracker)
109 return func(s *exprCtxState) {
110 s.planCacheTracker = tracker
111 }
112}
113
114// WithColumnIDAllocator sets the column id allocator for `ExprContext`.
115func WithColumnIDAllocator(allocator exprctx.PlanColumnIDAllocator) ExprCtxOption {

Callers 5

newReorgExprCtxFunction · 0.92
newLitExprContextFunction · 0.92
getExprCtxOptionsForTestFunction · 0.85
MakeExprContextStaticFunction · 0.85

Calls 1

AssertNotNilFunction · 0.92

Tested by 2

getExprCtxOptionsForTestFunction · 0.68