Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt: fix crdb_internal.decode_plan_gist to work with unknown index #84682

Merged
merged 1 commit into from
Jul 20, 2022
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
14 changes: 14 additions & 0 deletions pkg/sql/opt/exec/execbuilder/testdata/explain_gist
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,17 @@ SELECT crdb_internal.decode_plan_gist('$lookup_join_gist')
└── • scan
table: s83537@s83537_pkey
spans: FULL SCAN

# Ensure that we can decode a gist even if we do not have the schema info.
query T
SELECT crdb_internal.decode_plan_gist('AgGSARIAAwlAsJ8BE5IBAhcGFg==')
----
• limit
└── • index join
│ table: ?@?
└── • scan
table: ?@?
spans: 32 spans
limit: 10200
2 changes: 1 addition & 1 deletion pkg/sql/opt/exec/explain/plan_gist_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func (u *unknownTable) DeletableIndexCount() int {
}

func (u *unknownTable) Index(i cat.IndexOrdinal) cat.Index {
panic(errors.AssertionFailedf("not implemented"))
return &unknownIndex{}
}

func (u *unknownTable) StatisticCount() int {
Expand Down