Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pingcap/tidb into capture-baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
alivxxx committed Oct 15, 2019
2 parents 6f5ec11 + 8a8f41d commit e8d9aa9
Show file tree
Hide file tree
Showing 153 changed files with 7,056 additions and 3,301 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/expression @qw4990 @SunRunAway @XuHuaiyu @Reminiscent
/expression @pingcap/co-expression
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))):$(PWD)/tools/bin
export PATH := $(path_to_add):$(PATH)

GO := GO111MODULE=on go
GOBUILD := $(GO) build $(BUILD_FLAG) -tags codes
GOBUILD := $(GO) build $(BUILD_FLAG) -tags codes -trimpath
GOBUILDCOVERAGE := GOPATH=$(GOPATH) cd tidb-server; $(GO) test -coverpkg="../..." -c .
GOTEST := $(GO) test -p 4
OVERALLS := GO111MODULE=on overalls
Expand Down Expand Up @@ -41,6 +41,11 @@ CHECK_LDFLAGS += $(LDFLAGS) ${TEST_LDFLAGS}

TARGET = ""

# VB = Vector Benchmark
VB_FILE =
VB_FUNC =


.PHONY: all build update clean todo test gotest interpreter server dev benchkv benchraw check checklist parser tidy ddltest

default: server buildsucc
Expand Down Expand Up @@ -266,3 +271,13 @@ tools/bin/misspell:tools/check/go.mod
tools/bin/ineffassign:tools/check/go.mod
cd tools/check; \
$(GO) build -o ../bin/ineffassign github.com/gordonklaus/ineffassign

# Usage:
#
# $ make vectorized-bench VB_FILE=Time VB_FUNC=builtinCurrentDateSig
vectorized-bench:
cd ./expression && \
go test -v -benchmem \
-bench=BenchmarkVectorizedBuiltin$(VB_FILE)Func \
-run=BenchmarkVectorizedBuiltin$(VB_FILE)Func \
-args "$(VB_FUNC)"
85 changes: 10 additions & 75 deletions bindinfo/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,58 +326,22 @@ func (s *testSuite) TestGlobalAndSessionBindingBothExist(c *C) {
tk.MustExec("drop table if exists t2")
tk.MustExec("create table t1(id int)")
tk.MustExec("create table t2(id int)")

tk.MustQuery("explain SELECT * from t1,t2 where t1.id = t2.id").Check(testkit.Rows(
"HashLeftJoin_8 12487.50 root inner join, inner:TableReader_15, equal:[eq(Column#1, Column#3)]",
"├─TableReader_12 9990.00 root data:Selection_11",
"│ └─Selection_11 9990.00 cop not(isnull(Column#1))",
"│ └─TableScan_10 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo",
"└─TableReader_15 9990.00 root data:Selection_14",
" └─Selection_14 9990.00 cop not(isnull(Column#3))",
" └─TableScan_13 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo",
))

tk.MustQuery("explain SELECT /*+ TIDB_SMJ(t1, t2) */ * from t1,t2 where t1.id = t2.id").Check(testkit.Rows(
"MergeJoin_7 12487.50 root inner join, left key:Column#1, right key:Column#3",
"├─Sort_11 9990.00 root Column#1:asc",
"│ └─TableReader_10 9990.00 root data:Selection_9",
"│ └─Selection_9 9990.00 cop not(isnull(Column#1))",
"│ └─TableScan_8 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo",
"└─Sort_15 9990.00 root Column#3:asc",
" └─TableReader_14 9990.00 root data:Selection_13",
" └─Selection_13 9990.00 cop not(isnull(Column#3))",
" └─TableScan_12 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo",
))
c.Assert(tk.HasPlan("SELECT * from t1,t2 where t1.id = t2.id", "HashLeftJoin"), IsTrue)
c.Assert(tk.HasPlan("SELECT /*+ TIDB_SMJ(t1, t2) */ * from t1,t2 where t1.id = t2.id", "MergeJoin"), IsTrue)

tk.MustExec("create global binding for SELECT * from t1,t2 where t1.id = t2.id using SELECT /*+ TIDB_SMJ(t1, t2) */ * from t1,t2 where t1.id = t2.id")

metrics.BindUsageCounter.Reset()
tk.MustQuery("explain SELECT * from t1,t2 where t1.id = t2.id").Check(testkit.Rows(
"MergeJoin_7 12487.50 root inner join, left key:Column#1, right key:Column#3",
"├─Sort_11 9990.00 root Column#1:asc",
"│ └─TableReader_10 9990.00 root data:Selection_9",
"│ └─Selection_9 9990.00 cop not(isnull(Column#1))",
"│ └─TableScan_8 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo",
"└─Sort_15 9990.00 root Column#3:asc",
" └─TableReader_14 9990.00 root data:Selection_13",
" └─Selection_13 9990.00 cop not(isnull(Column#3))",
" └─TableScan_12 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo",
))
c.Assert(tk.HasPlan("SELECT * from t1,t2 where t1.id = t2.id", "MergeJoin"), IsTrue)
pb := &dto.Metric{}
metrics.BindUsageCounter.WithLabelValues(metrics.ScopeGlobal).Write(pb)
c.Assert(pb.GetCounter().GetValue(), Equals, float64(1))
tk.MustExec("set @@tidb_use_plan_baselines = 0")
c.Assert(tk.HasPlan("SELECT * from t1,t2 where t1.id = t2.id", "HashLeftJoin"), IsTrue)

tk.MustExec("drop global binding for SELECT * from t1,t2 where t1.id = t2.id")

tk.MustQuery("explain SELECT * from t1,t2 where t1.id = t2.id").Check(testkit.Rows(
"HashLeftJoin_8 12487.50 root inner join, inner:TableReader_15, equal:[eq(Column#1, Column#3)]",
"├─TableReader_12 9990.00 root data:Selection_11",
"│ └─Selection_11 9990.00 cop not(isnull(Column#1))",
"│ └─TableScan_10 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo",
"└─TableReader_15 9990.00 root data:Selection_14",
" └─Selection_14 9990.00 cop not(isnull(Column#3))",
" └─TableScan_13 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo",
))
tk.MustExec("set @@tidb_use_plan_baselines = 1")
c.Assert(tk.HasPlan("SELECT * from t1,t2 where t1.id = t2.id", "HashLeftJoin"), IsTrue)
}

func (s *testSuite) TestExplain(c *C) {
Expand All @@ -389,41 +353,12 @@ func (s *testSuite) TestExplain(c *C) {
tk.MustExec("create table t1(id int)")
tk.MustExec("create table t2(id int)")

tk.MustQuery("explain SELECT * from t1,t2 where t1.id = t2.id").Check(testkit.Rows(
"HashLeftJoin_8 12487.50 root inner join, inner:TableReader_15, equal:[eq(Column#1, Column#3)]",
"├─TableReader_12 9990.00 root data:Selection_11",
"│ └─Selection_11 9990.00 cop not(isnull(Column#1))",
"│ └─TableScan_10 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo",
"└─TableReader_15 9990.00 root data:Selection_14",
" └─Selection_14 9990.00 cop not(isnull(Column#3))",
" └─TableScan_13 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo",
))

tk.MustQuery("explain SELECT /*+ TIDB_SMJ(t1, t2) */ * from t1,t2 where t1.id = t2.id").Check(testkit.Rows(
"MergeJoin_7 12487.50 root inner join, left key:Column#1, right key:Column#3",
"├─Sort_11 9990.00 root Column#1:asc",
"│ └─TableReader_10 9990.00 root data:Selection_9",
"│ └─Selection_9 9990.00 cop not(isnull(Column#1))",
"│ └─TableScan_8 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo",
"└─Sort_15 9990.00 root Column#3:asc",
" └─TableReader_14 9990.00 root data:Selection_13",
" └─Selection_13 9990.00 cop not(isnull(Column#3))",
" └─TableScan_12 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo",
))
c.Assert(tk.HasPlan("SELECT * from t1,t2 where t1.id = t2.id", "HashLeftJoin"), IsTrue)
c.Assert(tk.HasPlan("SELECT /*+ TIDB_SMJ(t1, t2) */ * from t1,t2 where t1.id = t2.id", "MergeJoin"), IsTrue)

tk.MustExec("create global binding for SELECT * from t1,t2 where t1.id = t2.id using SELECT /*+ TIDB_SMJ(t1, t2) */ * from t1,t2 where t1.id = t2.id")

tk.MustQuery("explain SELECT * from t1,t2 where t1.id = t2.id").Check(testkit.Rows(
"MergeJoin_7 12487.50 root inner join, left key:Column#1, right key:Column#3",
"├─Sort_11 9990.00 root Column#1:asc",
"│ └─TableReader_10 9990.00 root data:Selection_9",
"│ └─Selection_9 9990.00 cop not(isnull(Column#1))",
"│ └─TableScan_8 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo",
"└─Sort_15 9990.00 root Column#3:asc",
" └─TableReader_14 9990.00 root data:Selection_13",
" └─Selection_13 9990.00 cop not(isnull(Column#3))",
" └─TableScan_12 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo",
))
c.Assert(tk.HasPlan("SELECT * from t1,t2 where t1.id = t2.id", "MergeJoin"), IsTrue)

tk.MustExec("drop global binding for SELECT * from t1,t2 where t1.id = t2.id")
}
Expand Down
24 changes: 12 additions & 12 deletions cmd/explaintest/r/access_path_selection.result
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,37 @@ KEY `IDX_ab` (`a`, `b`)
explain select a from access_path_selection where a < 3;
id count task operator info
IndexReader_6 3323.33 root index:IndexScan_5
└─IndexScan_5 3323.33 cop table:access_path_selection, index:a, range:[-inf,3), keep order:false, stats:pseudo
└─IndexScan_5 3323.33 cop[tikv] table:access_path_selection, index:a, range:[-inf,3), keep order:false, stats:pseudo
explain select a, b from access_path_selection where a < 3;
id count task operator info
IndexReader_6 3323.33 root index:IndexScan_5
└─IndexScan_5 3323.33 cop table:access_path_selection, index:a, b, range:[-inf,3), keep order:false, stats:pseudo
└─IndexScan_5 3323.33 cop[tikv] table:access_path_selection, index:a, b, range:[-inf,3), keep order:false, stats:pseudo
explain select a, b from access_path_selection where b < 3;
id count task operator info
IndexReader_13 3323.33 root index:Selection_12
└─Selection_12 3323.33 cop lt(Column#2, 3)
└─IndexScan_11 10000.00 cop table:access_path_selection, index:a, b, range:[NULL,+inf], keep order:false, stats:pseudo
└─Selection_12 3323.33 cop[tikv] lt(Column#2, 3)
└─IndexScan_11 10000.00 cop[tikv] table:access_path_selection, index:a, b, range:[NULL,+inf], keep order:false, stats:pseudo
explain select a, b from access_path_selection where a < 3 and b < 3;
id count task operator info
IndexReader_11 1104.45 root index:Selection_10
└─Selection_10 1104.45 cop lt(Column#2, 3)
└─IndexScan_9 3323.33 cop table:access_path_selection, index:a, b, range:[-inf,3), keep order:false, stats:pseudo
└─Selection_10 1104.45 cop[tikv] lt(Column#2, 3)
└─IndexScan_9 3323.33 cop[tikv] table:access_path_selection, index:a, b, range:[-inf,3), keep order:false, stats:pseudo
explain select a, b from access_path_selection where a > 10 order by _tidb_rowid;
id count task operator info
Projection_6 3333.33 root Column#1, Column#2
└─TableReader_13 3333.33 root data:Selection_12
└─Selection_12 3333.33 cop gt(Column#1, 10)
└─TableScan_11 10000.00 cop table:access_path_selection, range:[-inf,+inf], keep order:true, stats:pseudo
└─Selection_12 3333.33 cop[tikv] gt(Column#1, 10)
└─TableScan_11 10000.00 cop[tikv] table:access_path_selection, range:[-inf,+inf], keep order:true, stats:pseudo
explain select max(_tidb_rowid) from access_path_selection;
id count task operator info
StreamAgg_13 1.00 root funcs:max(Column#3)
└─Limit_17 1.00 root offset:0, count:1
└─TableReader_27 1.00 root data:Limit_26
└─Limit_26 1.00 cop offset:0, count:1
└─TableScan_25 1.25 cop table:access_path_selection, range:[-inf,+inf], keep order:true, desc, stats:pseudo
└─Limit_26 1.00 cop[tikv] offset:0, count:1
└─TableScan_25 1.25 cop[tikv] table:access_path_selection, range:[-inf,+inf], keep order:true, desc, stats:pseudo
explain select count(1) from access_path_selection;
id count task operator info
StreamAgg_28 1.00 root funcs:count(Column#7)
└─IndexReader_29 1.00 root index:StreamAgg_8
└─StreamAgg_8 1.00 cop funcs:count(1)
└─IndexScan_25 10000.00 cop table:access_path_selection, index:a, range:[NULL,+inf], keep order:false, stats:pseudo
└─StreamAgg_8 1.00 cop[tikv] funcs:count(1)
└─IndexScan_25 10000.00 cop[tikv] table:access_path_selection, index:a, range:[NULL,+inf], keep order:false, stats:pseudo
42 changes: 42 additions & 0 deletions cmd/explaintest/r/access_tiflash.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
drop table if exists t, tt;
create table t(a int, b int, index ia(a));
desc select avg(a) from t;
id count task operator info
StreamAgg_20 1.00 root funcs:avg(Column#8, Column#9)
└─IndexReader_21 1.00 root index:StreamAgg_8
└─StreamAgg_8 1.00 cop[tikv] funcs:avg(Column#1)
└─IndexScan_19 10000.00 cop[tikv] table:t, index:a, range:[NULL,+inf], keep order:false, stats:pseudo
desc select /*+ read_from_storage(tiflash[t]) */ avg(a) from t;
id count task operator info
StreamAgg_16 1.00 root funcs:avg(Column#8, Column#9)
└─TableReader_17 1.00 root data:StreamAgg_8
└─StreamAgg_8 1.00 cop[tiflash] funcs:count(Column#1), sum(Column#1)
└─TableScan_15 10000.00 cop[tiflash] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
desc select /*+ read_from_storage(tiflash[t]) */ sum(a) from t;
id count task operator info
StreamAgg_16 1.00 root funcs:sum(Column#7)
└─TableReader_17 1.00 root data:StreamAgg_8
└─StreamAgg_8 1.00 cop[tiflash] funcs:sum(Column#1)
└─TableScan_15 10000.00 cop[tiflash] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
desc select /*+ read_from_storage(tiflash[t]) */ sum(a+1) from t;
id count task operator info
StreamAgg_16 1.00 root funcs:sum(Column#7)
└─TableReader_17 1.00 root data:StreamAgg_8
└─StreamAgg_8 1.00 cop[tiflash] funcs:sum(plus(Column#1, 1))
└─TableScan_15 10000.00 cop[tiflash] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
desc select /*+ read_from_storage(tiflash[t]) */ sum(isnull(a)) from t;
id count task operator info
StreamAgg_16 1.00 root funcs:sum(Column#7)
└─TableReader_17 1.00 root data:StreamAgg_8
└─StreamAgg_8 1.00 cop[tiflash] funcs:sum(isnull(Column#1))
└─TableScan_15 10000.00 cop[tiflash] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
create table tt(a int, b int, primary key(a));
desc select * from tt where (tt.a > 1 and tt.a < 20) or (tt.a >= 30 and tt.a < 55);
id count task operator info
TableReader_6 44.00 root data:TableScan_5
└─TableScan_5 44.00 cop[tikv] table:tt, range:(1,20), [30,55), keep order:false, stats:pseudo
desc select /*+ read_from_storage(tiflash[tt]) */ * from tt where (tt.a > 1 and tt.a < 20) or (tt.a >= 30 and tt.a < 55);
id count task operator info
TableReader_7 44.00 root data:Selection_6
└─Selection_6 44.00 cop[tiflash] or(and(gt(Column#1, 1), lt(Column#1, 20)), and(ge(Column#1, 30), lt(Column#1, 55)))
└─TableScan_5 44.00 cop[tiflash] table:tt, range:[-inf,+inf], keep order:false, stats:pseudo
22 changes: 11 additions & 11 deletions cmd/explaintest/r/black_list.result
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,53 @@ create table t (a int);
explain select * from t where a < 1;
id count task operator info
TableReader_7 3323.33 root data:Selection_6
└─Selection_6 3323.33 cop lt(Column#1, 1)
└─TableScan_5 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─Selection_6 3323.33 cop[tikv] lt(Column#1, 1)
└─TableScan_5 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
insert into mysql.opt_rule_blacklist values('predicate_push_down');
admin reload opt_rule_blacklist;

explain select * from t where a < 1;
id count task operator info
Selection_5 8000.00 root lt(Column#1, 1)
└─TableReader_7 10000.00 root data:TableScan_6
└─TableScan_6 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableScan_6 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
delete from mysql.opt_rule_blacklist where name='predicate_push_down';
admin reload opt_rule_blacklist;

explain select * from t where a < 1;
id count task operator info
TableReader_7 3323.33 root data:Selection_6
└─Selection_6 3323.33 cop lt(Column#1, 1)
└─TableScan_5 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─Selection_6 3323.33 cop[tikv] lt(Column#1, 1)
└─TableScan_5 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
insert into mysql.expr_pushdown_blacklist values('<');
admin reload expr_pushdown_blacklist;

explain select * from t where a < 1;
id count task operator info
Selection_5 8000.00 root lt(Column#1, 1)
└─TableReader_7 10000.00 root data:TableScan_6
└─TableScan_6 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableScan_6 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
delete from mysql.expr_pushdown_blacklist where name='<';
admin reload expr_pushdown_blacklist;

explain select * from t where a < 1;
id count task operator info
TableReader_7 3323.33 root data:Selection_6
└─Selection_6 3323.33 cop lt(Column#1, 1)
└─TableScan_5 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─Selection_6 3323.33 cop[tikv] lt(Column#1, 1)
└─TableScan_5 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
insert into mysql.expr_pushdown_blacklist values('lt');
admin reload expr_pushdown_blacklist;

explain select * from t where a < 1;
id count task operator info
Selection_5 8000.00 root lt(Column#1, 1)
└─TableReader_7 10000.00 root data:TableScan_6
└─TableScan_6 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableScan_6 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
delete from mysql.expr_pushdown_blacklist where name='lt';
admin reload expr_pushdown_blacklist;

explain select * from t where a < 1;
id count task operator info
TableReader_7 3323.33 root data:Selection_6
└─Selection_6 3323.33 cop lt(Column#1, 1)
└─TableScan_5 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─Selection_6 3323.33 cop[tikv] lt(Column#1, 1)
└─TableScan_5 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
12 changes: 6 additions & 6 deletions cmd/explaintest/r/explain-non-select-stmt.result
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ explain insert into t select * from t;
id count task operator info
Insert_1 N/A root N/A
└─TableReader_7 10000.00 root data:TableScan_6
└─TableScan_6 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableScan_6 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
explain delete from t where a > 100;
id count task operator info
Delete_3 N/A root N/A
└─TableReader_6 3333.33 root data:Selection_5
└─Selection_5 3333.33 cop gt(Column#1, 100)
└─TableScan_4 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─Selection_5 3333.33 cop[tikv] gt(Column#1, 100)
└─TableScan_4 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
explain update t set b = 100 where a = 200;
id count task operator info
Update_3 N/A root N/A
└─TableReader_6 10.00 root data:Selection_5
└─Selection_5 10.00 cop eq(Column#1, 200)
└─TableScan_4 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─Selection_5 10.00 cop[tikv] eq(Column#1, 200)
└─TableScan_4 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
explain replace into t select a, 100 from t;
id count task operator info
Insert_1 N/A root N/A
└─Projection_5 10000.00 root Column#3, 100
└─TableReader_7 10000.00 root data:TableScan_6
└─TableScan_6 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableScan_6 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo
8 changes: 4 additions & 4 deletions cmd/explaintest/r/explain.result
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ set session tidb_hashagg_partial_concurrency = 1;
set session tidb_hashagg_final_concurrency = 1;
explain select group_concat(a) from t group by id;
id count task operator info
StreamAgg_8 8000.00 root group by:Column#6, funcs:group_concat(Column#0, ",")
StreamAgg_8 8000.00 root group by:Column#7, funcs:group_concat(Column#6, ",")
└─Projection_18 10000.00 root cast(Column#2), Column#1
└─TableReader_15 10000.00 root data:TableScan_14
└─TableScan_14 10000.00 cop table:t, range:[-inf,+inf], keep order:true, stats:pseudo
└─TableScan_14 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:true, stats:pseudo
explain select group_concat(a, b) from t group by id;
id count task operator info
StreamAgg_8 8000.00 root group by:Column#6, funcs:group_concat(Column#0, Column#0, ",")
StreamAgg_8 8000.00 root group by:Column#8, funcs:group_concat(Column#6, Column#7, ",")
└─Projection_18 10000.00 root cast(Column#2), cast(Column#3), Column#1
└─TableReader_15 10000.00 root data:TableScan_14
└─TableScan_14 10000.00 cop table:t, range:[-inf,+inf], keep order:true, stats:pseudo
└─TableScan_14 10000.00 cop[tikv] table:t, range:[-inf,+inf], keep order:true, stats:pseudo
drop table t;
Loading

0 comments on commit e8d9aa9

Please sign in to comment.