diff --git a/pkg/sql/catalog/accessor.go b/pkg/sql/catalog/accessor.go index 5b199911f92a..823c0b5037ab 100644 --- a/pkg/sql/catalog/accessor.go +++ b/pkg/sql/catalog/accessor.go @@ -40,5 +40,5 @@ type Accessor interface { // descriptor and that of its parent database. If the object is not // found and flags.required is true, an error is returned, otherwise // a nil reference is returned. - GetObjectDesc(ctx context.Context, txn *kv.Txn, settings *cluster.Settings, codec keys.SQLCodec, db, schema, object string, flags tree.ObjectLookupFlags) (ObjectDescriptor, error) + GetObjectDesc(ctx context.Context, txn *kv.Txn, settings *cluster.Settings, codec keys.SQLCodec, db, schema, object string, flags tree.ObjectLookupFlags) (Descriptor, error) } diff --git a/pkg/sql/catalog/accessors/logical_schema_accessors.go b/pkg/sql/catalog/accessors/logical_schema_accessors.go index 707eca9d451e..8a55969270e8 100644 --- a/pkg/sql/catalog/accessors/logical_schema_accessors.go +++ b/pkg/sql/catalog/accessors/logical_schema_accessors.go @@ -95,7 +95,7 @@ func (l *LogicalSchemaAccessor) GetObjectDesc( codec keys.SQLCodec, db, schema, object string, flags tree.ObjectLookupFlags, -) (catalog.ObjectDescriptor, error) { +) (catalog.Descriptor, error) { switch flags.DesiredObjectKind { case tree.TypeObject: // TODO(ajwerner): Change this function if we ever expose non-table objects diff --git a/pkg/sql/catalog/accessors/physical_schema_accessors.go b/pkg/sql/catalog/accessors/physical_schema_accessors.go index e3571e9f7575..4169b73d98a3 100644 --- a/pkg/sql/catalog/accessors/physical_schema_accessors.go +++ b/pkg/sql/catalog/accessors/physical_schema_accessors.go @@ -110,7 +110,7 @@ func (a *CachedPhysicalAccessor) GetObjectDesc( codec keys.SQLCodec, db, schema, object string, flags tree.ObjectLookupFlags, -) (catalog.ObjectDescriptor, error) { +) (catalog.Descriptor, error) { switch flags.DesiredObjectKind { case tree.TypeObject: // TypeObjects are not caches so fall through to the underlying physical diff --git a/pkg/sql/catalog/catalog.go b/pkg/sql/catalog/catalog.go index 04734bf2cccd..026777ef582d 100644 --- a/pkg/sql/catalog/catalog.go +++ b/pkg/sql/catalog/catalog.go @@ -15,8 +15,8 @@ import ( "github.com/cockroachdb/cockroach/pkg/sql/sqlbase" ) -// ObjectDescriptor provides table information for results from a name lookup. -type ObjectDescriptor interface { +// Descriptor provides table information for results from a name lookup. +type Descriptor interface { tree.NameResolutionResult // DatabaseDesc returns the underlying database descriptor, or nil if the @@ -43,7 +43,7 @@ type VirtualSchemas interface { // VirtualSchema represents a collection of VirtualObjects. type VirtualSchema interface { - Desc() ObjectDescriptor + Desc() Descriptor NumTables() int VisitTables(func(object VirtualObject)) GetObjectByName(name string) (VirtualObject, error) @@ -51,7 +51,7 @@ type VirtualSchema interface { // VirtualObject is a virtual schema object. type VirtualObject interface { - Desc() ObjectDescriptor + Desc() Descriptor } // TableEntry is the value type of FkTableMetadata: An optional table diff --git a/pkg/sql/catalog/catalogkv/physical_accessor.go b/pkg/sql/catalog/catalogkv/physical_accessor.go index 06899088bd54..291592a4c89b 100644 --- a/pkg/sql/catalog/catalogkv/physical_accessor.go +++ b/pkg/sql/catalog/catalogkv/physical_accessor.go @@ -161,7 +161,7 @@ func (a UncachedPhysicalAccessor) GetObjectDesc( codec keys.SQLCodec, db, schema, object string, flags tree.ObjectLookupFlags, -) (catalog.ObjectDescriptor, error) { +) (catalog.Descriptor, error) { // Look up the database ID. dbID, err := GetDatabaseID(ctx, txn, codec, db, flags.Required) if err != nil || dbID == sqlbase.InvalidID { diff --git a/pkg/sql/catalog/resolver/resolver.go b/pkg/sql/catalog/resolver/resolver.go index 31edf1c04425..c7049dd75084 100644 --- a/pkg/sql/catalog/resolver/resolver.go +++ b/pkg/sql/catalog/resolver/resolver.go @@ -144,7 +144,7 @@ func ResolveExistingObject( return nil, prefix, nil } - obj := descI.(catalog.ObjectDescriptor) + obj := descI.(catalog.Descriptor) switch lookupFlags.DesiredObjectKind { case tree.TypeObject: if obj.TypeDesc() == nil { diff --git a/pkg/sql/virtual_schema.go b/pkg/sql/virtual_schema.go index e977662c7c72..62f2b2fa67d6 100644 --- a/pkg/sql/virtual_schema.go +++ b/pkg/sql/virtual_schema.go @@ -290,7 +290,7 @@ type virtualSchemaEntry struct { allTableNames map[string]struct{} } -func (v virtualSchemaEntry) Desc() catalog.ObjectDescriptor { +func (v virtualSchemaEntry) Desc() catalog.Descriptor { return v.desc } @@ -322,7 +322,7 @@ type virtualDefEntry struct { validWithNoDatabaseContext bool } -func (e virtualDefEntry) Desc() catalog.ObjectDescriptor { +func (e virtualDefEntry) Desc() catalog.Descriptor { return sqlbase.NewImmutableTableDescriptor(*e.desc) } diff --git a/pkg/workload/tpcds/tpcds.go b/pkg/workload/tpcds/tpcds.go index 0e048ac81098..224e03b91d62 100644 --- a/pkg/workload/tpcds/tpcds.go +++ b/pkg/workload/tpcds/tpcds.go @@ -66,7 +66,7 @@ var tpcdsMeta = workload.Meta{ `Note that --queries-to-omit flag has a higher precedence`) g.flags.DurationVar(&g.queryTimeLimit, `query-time-limit`, 5*time.Minute, `Time limit for a single run of a query`) - g.flags.StringVar(&g.vectorize, `vectorize`, `auto`, + g.flags.StringVar(&g.vectorize, `vectorize`, `on`, `Set vectorize session variable`) g.connFlags = workload.NewConnFlags(&g.flags) return g diff --git a/pkg/workload/tpch/tpch.go b/pkg/workload/tpch/tpch.go index 8559d0050e35..b14fa722aa23 100644 --- a/pkg/workload/tpch/tpch.go +++ b/pkg/workload/tpch/tpch.go @@ -105,7 +105,7 @@ var tpchMeta = workload.Meta{ g.flags.BoolVar(&g.disableChecks, `disable-checks`, false, "Disable checking the output against the expected rows (default false). "+ "Note that the checks are only supported for scale factor 1") - g.flags.StringVar(&g.vectorize, `vectorize`, `auto`, + g.flags.StringVar(&g.vectorize, `vectorize`, `on`, `Set vectorize session variable`) g.flags.BoolVar(&g.verbose, `verbose`, false, `Prints out the queries being run as well as histograms`)