diff --git a/statistics/handle/storage/BUILD.bazel b/statistics/handle/storage/BUILD.bazel new file mode 100644 index 0000000000000..1b15d4eb398e3 --- /dev/null +++ b/statistics/handle/storage/BUILD.bazel @@ -0,0 +1,56 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "storage", + srcs = [ + "gc.go", + "json.go", + "read.go", + "save.go", + "update.go", + ], + importpath = "github.com/pingcap/tidb/statistics/handle/storage", + visibility = ["//visibility:public"], + deps = [ + "//config", + "//infoschema", + "//parser/ast", + "//parser/model", + "//parser/mysql", + "//parser/terror", + "//sessionctx", + "//sessionctx/stmtctx", + "//sessionctx/variable", + "//statistics", + "//statistics/handle/cache", + "//statistics/handle/lockstats", + "//statistics/handle/util", + "//types", + "//util/chunk", + "//util/compress", + "//util/logutil", + "//util/mathutil", + "//util/memory", + "//util/sqlexec", + "@com_github_klauspost_compress//gzip", + "@com_github_pingcap_errors//:errors", + "@com_github_pingcap_failpoint//:failpoint", + "@com_github_pingcap_tipb//go-tipb", + "@com_github_tikv_client_go_v2//oracle", + "@org_uber_go_zap//:zap", + ], +) + +go_test( + name = "storage_test", + timeout = "short", + srcs = ["read_test.go"], + flaky = True, + deps = [ + "//parser/model", + "//planner/cardinality", + "//testkit", + "//types", + "@com_github_stretchr_testify//require", + ], +)