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

release-22.1: sql: fix explain gist output to show number of scan span constraints #85348

Merged
merged 1 commit into from
Aug 2, 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
6 changes: 4 additions & 2 deletions pkg/sql/opt/exec/explain/plan_gist_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,10 @@ func (f *PlanGistFactory) decodeScanParams() exec.ScanParams {
if l > 0 {
idxConstraint = new(constraint.Constraint)
idxConstraint.Spans.Alloc(l)
var sp constraint.Span
idxConstraint.Spans.Append(&sp)
for i := 0; i < l; i++ {
var sp constraint.Span
idxConstraint.Spans.Append(&sp)
}
}

var invertedConstraint inverted.Spans
Expand Down
14 changes: 14 additions & 0 deletions pkg/sql/opt/exec/explain/testdata/gists
Original file line number Diff line number Diff line change
Expand Up @@ -1119,3 +1119,17 @@ explain(shape):
• explain
explain(gist):
• explain

# Regression test for #85324
explain-plan-gist
AgHyAQIA//8HHgAAByoFKiHyAQAA
----
• update
│ table: ?
│ set
└── • render
└── • scan
table: ?@?
spans: 15 spans