-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathBUILD.bazel
110 lines (107 loc) · 3.17 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "memo",
srcs = [
"check_expr.go",
"check_expr_skip.go", # keep
"constraint_builder.go",
"cost.go",
"expr.go",
"expr_format.go",
"expr_name_gen.go",
"extract.go",
"filters_expr_mutate_checker.go",
"filters_expr_mutate_checker_skip.go", # keep
"group.go",
"interner.go",
"logical_props_builder.go",
"memo.go",
"multiplicity_builder.go",
"statistics_builder.go",
"typing.go",
":gen-expr", # keep
],
importpath = "github.com/cockroachdb/cockroach/pkg/sql/opt/memo",
visibility = ["//visibility:public"],
deps = [
"//pkg/geo/geoindex",
"//pkg/sql/catalog/colinfo",
"//pkg/sql/catalog/descpb",
"//pkg/sql/inverted",
"//pkg/sql/opt",
"//pkg/sql/opt/cat",
"//pkg/sql/opt/constraint",
"//pkg/sql/opt/invertedexpr", # keep
"//pkg/sql/opt/props",
"//pkg/sql/opt/props/physical",
"//pkg/sql/rowenc",
"//pkg/sql/sem/builtins",
"//pkg/sql/sem/tree",
"//pkg/sql/types",
"//pkg/util",
"//pkg/util/duration",
"//pkg/util/encoding",
"//pkg/util/json",
"//pkg/util/log",
"//pkg/util/timeutil/pgdate",
"//pkg/util/treeprinter",
"@com_github_cockroachdb_errors//:errors",
],
)
go_test(
name = "memo_test",
size = "small",
srcs = [
"cost_test.go",
"expr_test.go",
"interner_test.go",
"logical_props_builder_test.go",
"memo_test.go",
"multiplicity_builder_test.go",
"statistics_builder_test.go",
"typing_test.go",
],
data = glob(["testdata/**"]) + [
"@cockroach//c-deps:libgeos",
"//pkg/sql/opt/testutils/opttester:testfixtures",
],
embed = [":memo"],
deps = [
"//pkg/settings/cluster",
"//pkg/sql/inverted",
"//pkg/sql/opt",
"//pkg/sql/opt/constraint",
"//pkg/sql/opt/norm",
"//pkg/sql/opt/optbuilder",
"//pkg/sql/opt/props",
"//pkg/sql/opt/props/physical",
"//pkg/sql/opt/testutils",
"//pkg/sql/opt/testutils/opttester",
"//pkg/sql/opt/testutils/testcat",
"//pkg/sql/opt/xform",
"//pkg/sql/parser",
"//pkg/sql/randgen",
"//pkg/sql/sem/builtins",
"//pkg/sql/sem/tree",
"//pkg/sql/types",
"//pkg/testutils",
"//pkg/util/duration",
"//pkg/util/leaktest",
"//pkg/util/timeofday",
"//pkg/util/timeutil/pgdate",
"@com_github_cockroachdb_datadriven//:datadriven",
"@com_github_cockroachdb_errors//:errors",
"@org_golang_x_tools//container/intsets",
],
)
# Define a gerator for expression definitions and functions.
genrule(
name = "gen-expr",
srcs = ["//pkg/sql/opt:ops"],
outs = ["expr.og.go"],
cmd = """
$(location //pkg/sql/opt/optgen/cmd/optgen) -out $@ exprs $(locations //pkg/sql/opt:ops)
""",
exec_tools = ["//pkg/sql/opt/optgen/cmd/optgen"],
visibility = ["//visibility:public"],
)