-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql/storageparam: break builtins dep on tabledesc
The TableStorageParamObserver meant that paramparse and transitively builtins depended on tabledesc. This was unfortunate because we want seqexpr is depended on by builtins and we want to use seqexpr in tabledesc, so we have to make sure that builtins does not depend on tabledesc. This commit achieves that goal by splitting out paramparse into three new packages from paramparse: * sql/storageparam: defines the interface for the Setter, contains functions to drive forward the setting and resetting of params, and has some shared functionality. * sql/storageparam/indexstorageparam: implementation of storageparam.Setter for the `descpb.IndexDescriptor`. * sql/storageparam/tablestorageparam: implementation of storageparam.Setter for the `*tabledesc.Mutable`. This allows the `builtins` package to use the `indexstorageparam` package cleanly without depending on `*tabledesc.Mutable`. It also recognizes that lots of utility methods in `paramparse` aren't about `storageparam`s. Release note: None
- Loading branch information
Showing
14 changed files
with
464 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "storageparam", | ||
srcs = ["storage_param.go"], | ||
importpath = "github.com/cockroachdb/cockroach/pkg/sql/storageparam", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/server/telemetry", | ||
"//pkg/sql/paramparse", | ||
"//pkg/sql/pgwire/pgcode", | ||
"//pkg/sql/pgwire/pgerror", | ||
"//pkg/sql/pgwire/pgnotice", | ||
"//pkg/sql/sem/eval", | ||
"//pkg/sql/sem/normalize", | ||
"//pkg/sql/sem/tree", | ||
"//pkg/sql/sqltelemetry", | ||
"//pkg/sql/types", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "indexstorageparam", | ||
srcs = ["index_storage_param.go"], | ||
importpath = "github.com/cockroachdb/cockroach/pkg/sql/storageparam/indexstorageparam", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/geo/geoindex", | ||
"//pkg/sql/catalog/descpb", | ||
"//pkg/sql/paramparse", | ||
"//pkg/sql/pgwire/pgcode", | ||
"//pkg/sql/pgwire/pgerror", | ||
"//pkg/sql/sem/eval", | ||
"//pkg/sql/sem/tree", | ||
"//pkg/sql/storageparam", | ||
"//pkg/util/errorutil/unimplemented", | ||
"@com_github_cockroachdb_errors//:errors", | ||
], | ||
) |
Oops, something went wrong.