Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#56848
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
terry1purcell authored and ti-chi-bot committed Nov 7, 2024
1 parent 5e6bbb5 commit a6bcba2
Show file tree
Hide file tree
Showing 4 changed files with 1,158 additions and 0 deletions.
97 changes: 97 additions & 0 deletions pkg/planner/cardinality/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "cardinality",
srcs = [
"cross_estimation.go",
"join.go",
"ndv.go",
"pseudo.go",
"row_count_column.go",
"row_count_index.go",
"row_size.go",
"selectivity.go",
"trace.go",
],
importpath = "github.com/pingcap/tidb/pkg/planner/cardinality",
visibility = ["//visibility:public"],
deps = [
"//pkg/expression",
"//pkg/kv",
"//pkg/meta/model",
"//pkg/parser/ast",
"//pkg/parser/format",
"//pkg/parser/mysql",
"//pkg/planner/planctx",
"//pkg/planner/property",
"//pkg/planner/util",
"//pkg/planner/util/debugtrace",
"//pkg/planner/util/fixcontrol",
"//pkg/sessionctx/stmtctx",
"//pkg/statistics",
"//pkg/tablecodec",
"//pkg/types",
"//pkg/types/parser_driver",
"//pkg/util/chunk",
"//pkg/util/codec",
"//pkg/util/collate",
"//pkg/util/logutil",
"//pkg/util/mathutil",
"//pkg/util/ranger",
"//pkg/util/set",
"//pkg/util/tracing",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@org_uber_go_zap//:zap",
],
)

go_test(
name = "cardinality_test",
timeout = "short",
srcs = [
"main_test.go",
"row_count_test.go",
"row_size_test.go",
"selectivity_test.go",
"trace_test.go",
],
data = glob(["testdata/**"]),
embed = [":cardinality"],
flaky = True,
shard_count = 29,
deps = [
"//pkg/config",
"//pkg/domain",
"//pkg/executor",
"//pkg/expression",
"//pkg/infoschema",
"//pkg/kv",
"//pkg/meta/model",
"//pkg/parser",
"//pkg/parser/model",
"//pkg/parser/mysql",
"//pkg/planner/core",
"//pkg/planner/core/base",
"//pkg/planner/core/operator/logicalop",
"//pkg/planner/core/resolve",
"//pkg/session",
"//pkg/sessionctx",
"//pkg/sessionctx/stmtctx",
"//pkg/sessionctx/variable",
"//pkg/statistics",
"//pkg/testkit",
"//pkg/testkit/testdata",
"//pkg/testkit/testmain",
"//pkg/testkit/testsetup",
"//pkg/types",
"//pkg/util/codec",
"//pkg/util/collate",
"//pkg/util/mock",
"//pkg/util/ranger",
"//pkg/util/tracing",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_stretchr_testify//require",
"@org_uber_go_goleak//:goleak",
],
)
Loading

0 comments on commit a6bcba2

Please sign in to comment.