Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#40472
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
time-and-fate authored and ti-chi-bot committed Jan 11, 2023
1 parent 74fd05e commit 897b67f
Show file tree
Hide file tree
Showing 3 changed files with 693 additions and 1 deletion.
119 changes: 119 additions & 0 deletions statistics/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "statistics",
srcs = [
"analyze.go",
"analyze_jobs.go",
"builder.go",
"cmsketch.go",
"column.go",
"estimate.go",
"feedback.go",
"fmsketch.go",
"histogram.go",
"index.go",
"merge_worker.go",
"row_sampler.go",
"sample.go",
"scalar.go",
"selectivity.go",
"table.go",
],
importpath = "github.com/pingcap/tidb/statistics",
visibility = ["//visibility:public"],
deps = [
"//expression",
"//kv",
"//metrics",
"//parser/ast",
"//parser/charset",
"//parser/format",
"//parser/model",
"//parser/mysql",
"//parser/terror",
"//planner/util",
"//sessionctx",
"//sessionctx/stmtctx",
"//sessionctx/variable",
"//tablecodec",
"//types",
"//types/parser_driver",
"//util/chunk",
"//util/codec",
"//util/collate",
"//util/dbterror",
"//util/fastrand",
"//util/hack",
"//util/logutil",
"//util/mathutil",
"//util/memory",
"//util/ranger",
"//util/sqlexec",
"//util/tracing",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_pingcap_log//:log",
"@com_github_pingcap_tipb//go-tipb",
"@com_github_twmb_murmur3//:murmur3",
"@org_golang_x_exp//slices",
"@org_uber_go_atomic//:atomic",
"@org_uber_go_zap//:zap",
],
)

go_test(
name = "statistics_test",
timeout = "short",
srcs = [
"cmsketch_test.go",
"feedback_test.go",
"fmsketch_test.go",
"histogram_test.go",
"integration_test.go",
"main_test.go",
"sample_test.go",
"scalar_test.go",
"selectivity_test.go",
"statistics_test.go",
"trace_test.go",
],
data = glob(["testdata/**"]),
embed = [":statistics"],
flaky = True,
deps = [
"//config",
"//domain",
"//infoschema",
"//kv",
"//parser",
"//parser/ast",
"//parser/model",
"//parser/mysql",
"//planner/core",
"//session",
"//sessionctx",
"//sessionctx/stmtctx",
"//sessionctx/variable",
"//statistics/handle",
"//testkit",
"//testkit/testdata",
"//testkit/testmain",
"//testkit/testsetup",
"//types",
"//util/chunk",
"//util/codec",
"//util/collate",
"//util/mock",
"//util/ranger",
"//util/sqlexec",
"//util/tracing",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_pingcap_log//:log",
"@com_github_stretchr_testify//require",
"@org_golang_x_exp//slices",
"@org_uber_go_goleak//:goleak",
"@org_uber_go_zap//:zap",
],
)
Loading

0 comments on commit 897b67f

Please sign in to comment.