Skip to content

Commit

Permalink
parser: remove universal keyword (#50103)
Browse files Browse the repository at this point in the history
close #50066
  • Loading branch information
hawkingrei authored Jan 5, 2024
1 parent 7e83932 commit b4ba24b
Show file tree
Hide file tree
Showing 8 changed files with 10,351 additions and 10,412 deletions.
4 changes: 0 additions & 4 deletions pkg/parser/ast/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,6 @@ type CreateBindingStmt struct {
stmtNode

GlobalScope bool
IsUniversal bool
OriginNode StmtNode
HintedNode StmtNode
PlanDigest string
Expand All @@ -1985,9 +1984,6 @@ func (n *CreateBindingStmt) Restore(ctx *format.RestoreCtx) error {
} else {
ctx.WriteKeyWord("SESSION ")
}
if n.IsUniversal {
ctx.WriteKeyWord("UNIVERSAL ")
}
if n.OriginNode == nil {
ctx.WriteKeyWord("BINDING FROM HISTORY USING PLAN DIGEST ")
ctx.WriteString(n.PlanDigest)
Expand Down
1 change: 0 additions & 1 deletion pkg/parser/keywords.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,6 @@ var Keywords = []KeywordsType{
{"UNCOMMITTED", false, "unreserved"},
{"UNDEFINED", false, "unreserved"},
{"UNICODE", false, "unreserved"},
{"UNIVERSAL", false, "unreserved"},
{"UNKNOWN", false, "unreserved"},
{"UNSET", false, "unreserved"},
{"USER", false, "unreserved"},
Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/keywords_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestKeywords(t *testing.T) {
}

func TestKeywordsLength(t *testing.T) {
require.Equal(t, 647, len(parser.Keywords))
require.Equal(t, 646, len(parser.Keywords))

reservedNr := 0
for _, kw := range parser.Keywords {
Expand Down
1 change: 0 additions & 1 deletion pkg/parser/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,6 @@ var tokenMap = map[string]int{
"UNDEFINED": undefined,
"UNICODE": unicodeSym,
"UNION": union,
"UNIVERSAL": universal,
"UNIQUE": unique,
"UNKNOWN": unknown,
"UNLOCK": unlock,
Expand Down
Loading

0 comments on commit b4ba24b

Please sign in to comment.