Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pkg/parser/ast/dml.go
Original file line number Diff line number Diff line change
Expand Up @@ -3050,6 +3050,7 @@ const (
ShowCreateProcedure
ShowBinlogStatus
ShowReplicaStatus
ShowDistributions
)

const (
Expand Down Expand Up @@ -3394,6 +3395,16 @@ func (n *ShowStmt) Restore(ctx *format.RestoreCtx) error {
ctx.WriteKeyWord("BINDING_CACHE STATUS")
case ShowAnalyzeStatus:
ctx.WriteKeyWord("ANALYZE STATUS")
case ShowDistributions:
ctx.WriteKeyWord("TABLE ")
if err := n.Table.Restore(ctx); err != nil {
return errors.Annotate(err, "An error occurred while restore ShowStmt.Table")
}
ctx.WriteKeyWord(" DISTRIBUTIONS")
if err := restoreShowLikeOrWhereOpt(); err != nil {
return err
}
return nil
case ShowRegions:
ctx.WriteKeyWord("TABLE ")
if err := n.Table.Restore(ctx); err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/parser/keywords.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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, 655, len(parser.Keywords))
require.Equal(t, 656, len(parser.Keywords))

reservedNr := 0
for _, kw := range parser.Keywords {
Expand Down
1 change: 1 addition & 0 deletions pkg/parser/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ var tokenMap = map[string]int{
"DISK": disk,
"DISTINCT": distinct,
"DISTINCTROW": distinct,
"DISTRIBUTIONS": distributions,
"DIV": div,
"DO": do,
"DOT": dotType,
Expand Down
Loading