sql: internalLookupCtx should be constructed using a collection #83919
Labels
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
This requires a fairly simple rewrite of the
newInternalLookupCtx
definition and all its call sites except one:cockroach/pkg/sql/show_create.go
Lines 232 to 234 in 8b356c4
In this case, we don't rely on descriptors provided by
descs.Collection
, instead these come from a backup manifest. To deal with this, try inserting these descriptors as synthetic descriptors into thedescs.Collection
. That way,newInternalLookupCtx
can become oblivious to where the descriptors are actually sourced from.Jira issue: CRDB-17352
The text was updated successfully, but these errors were encountered: