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

Function cleanPartition

pkg/parser/parser_test.go:6916–6931  ·  view source on GitHub ↗
(n ast.Node)

Source from the content-addressed store, hash-verified

6914}
6915
6916func cleanPartition(n ast.Node) {
6917 if p, ok := n.(*ast.PartitionOptions); ok && p != nil {
6918 var tmpCleaner nodeTextCleaner
6919 if p.Interval != nil {
6920 p.Interval.SetText(nil, "")
6921 p.Interval.SetOriginTextPosition(0)
6922 p.Interval.IntervalExpr.Expr.Accept(&tmpCleaner)
6923 if p.Interval.FirstRangeEnd != nil {
6924 (*p.Interval.FirstRangeEnd).Accept(&tmpCleaner)
6925 }
6926 if p.Interval.LastRangeEnd != nil {
6927 (*p.Interval.LastRangeEnd).Accept(&tmpCleaner)
6928 }
6929 }
6930 }
6931}
6932
6933// Enter implements Visitor interface.
6934func (checker *nodeTextCleaner) Enter(in ast.Node) (out ast.Node, skipChildren bool) {

Callers 1

EnterMethod · 0.85

Calls 3

SetTextMethod · 0.65
SetOriginTextPositionMethod · 0.65
AcceptMethod · 0.65

Tested by

no test coverage detected