-
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.
94116: fetchpb: extract index fetch spec into a separate package r=yuzefovich a=yuzefovich This will allow us to import the index fetch spec into `roachpb` which is needed for the KV projection pushdown work. This required changing the custom cast types used in the spec from type aliases defined in `descpb` to one level lower ones from `catid`. Epic: CRDB-14837 Release note: None 94342: optbuilder: disable RANGE window mode with offsets and NULLS LAST r=yuzefovich a=yuzefovich This commit makes it so that we return a regular error when building the window frame with RANGE mode with offsets when NULLS LAST ordering is requested. The execution engine assumes that exactly one column is included in the ordering for such a frame, and we recently fixed how we handle NULLS LAST (by projecting another column), so at the moment with such queries we encounter a scary-looking internal error, and now we'll get a regular error. Teaching the execution engine about this is not exactly trivial, so for now we'll just prohibit such queries. Addresses: #94032. Epic: None Release note (bug fix): Previously, CockroachDB could encounter an internal error when evaluating window functions with RANGE window frame mode with OFFSET PRECEDING or OFFSET FOLLOWING boundary when ORDER BY clause has NULLS LAST option. This will now result in a regular error since the feature is marked as unsupported. Co-authored-by: Yahor Yuzefovich <[email protected]>
- Loading branch information
Showing
60 changed files
with
239 additions
and
113 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
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,49 @@ | ||
load("//build/bazelutil/unused_checker:unused.bzl", "get_x_data") | ||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "fetchpb", | ||
srcs = ["index_fetch.go"], | ||
embed = [":fetchpb_go_proto"], | ||
importpath = "github.com/cockroachdb/cockroach/pkg/sql/catalog/fetchpb", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/sql/catalog/catenumpb", | ||
"//pkg/sql/sem/catid", # keep | ||
"//pkg/sql/types", | ||
"//pkg/util/encoding", | ||
], | ||
) | ||
|
||
proto_library( | ||
name = "fetchpb_proto", | ||
srcs = [ | ||
"index_fetch.proto", | ||
], | ||
strip_import_prefix = "/pkg", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/geo/geoindex:geoindex_proto", | ||
"//pkg/sql/catalog/catenumpb:catenumpb_proto", | ||
"//pkg/sql/types:types_proto", | ||
"@com_github_gogo_protobuf//gogoproto:gogo_proto", | ||
], | ||
) | ||
|
||
go_proto_library( | ||
name = "fetchpb_go_proto", | ||
compilers = ["//pkg/cmd/protoc-gen-gogoroach:protoc-gen-gogoroach_compiler"], | ||
importpath = "github.com/cockroachdb/cockroach/pkg/sql/catalog/fetchpb", | ||
proto = ":fetchpb_proto", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/geo/geoindex", | ||
"//pkg/sql/catalog/catenumpb", | ||
"//pkg/sql/types", | ||
"@com_github_gogo_protobuf//gogoproto", | ||
], | ||
) | ||
|
||
get_x_data(name = "get_x_data") |
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
Oops, something went wrong.