-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release 3.1: port tiflash support from master to release3.1 (#14537)
- Loading branch information
Showing
133 changed files
with
7,213 additions
and
3,213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
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_16 1.00 root funcs:avg(col_0, col_1) | ||
└─IndexReader_17 1.00 root index:StreamAgg_8 | ||
└─StreamAgg_8 1.00 cop[tikv] funcs:avg(test.t.a) | ||
└─IndexScan_15 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(col_0, col_1) | ||
└─TableReader_17 1.00 root data:StreamAgg_8 | ||
└─StreamAgg_8 1.00 cop[tiflash] funcs:count(test.t.a), sum(test.t.a) | ||
└─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(col_0) | ||
└─TableReader_17 1.00 root data:StreamAgg_8 | ||
└─StreamAgg_8 1.00 cop[tiflash] funcs:sum(test.t.a) | ||
└─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(col_0) | ||
└─TableReader_17 1.00 root data:StreamAgg_8 | ||
└─StreamAgg_8 1.00 cop[tiflash] funcs:sum(plus(test.t.a, 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(col_0) | ||
└─TableReader_17 1.00 root data:StreamAgg_8 | ||
└─StreamAgg_8 1.00 cop[tiflash] funcs:sum(isnull(test.t.a)) | ||
└─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(test.tt.a, 1), lt(test.tt.a, 20)), and(ge(test.tt.a, 30), lt(test.tt.a, 55))) | ||
└─TableScan_5 44.00 cop[tiflash] table:tt, range:[-inf,+inf], keep order:false, stats:pseudo | ||
drop table if exists ttt; | ||
create table ttt (a int, primary key (a desc)); | ||
desc select * from ttt order by ttt.a desc; | ||
id count task operator info | ||
TableReader_11 10000.00 root data:TableScan_10 | ||
└─TableScan_10 10000.00 cop[tikv] table:ttt, range:[-inf,+inf], keep order:true, desc, stats:pseudo | ||
desc select /*+ read_from_storage(tiflash[ttt]) */ * from ttt order by ttt.a desc; | ||
id count task operator info | ||
Sort_4 10000.00 root test.ttt.a:desc | ||
└─TableReader_8 10000.00 root data:TableScan_7 | ||
└─TableScan_7 10000.00 cop[tiflash] table:ttt, range:[-inf,+inf], keep order:false, stats:pseudo | ||
desc select /*+ read_from_storage(tiflash[ttt]) */ * from ttt order by ttt.a; | ||
id count task operator info | ||
TableReader_11 10000.00 root data:TableScan_10 | ||
└─TableScan_10 10000.00 cop[tiflash] table:ttt, range:[-inf,+inf], keep order:true, stats:pseudo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use test; | ||
drop table if exists t; | ||
create table t(a bigint, b bigint); | ||
explain insert into t values(1, 1); | ||
id count task operator info | ||
Insert_1 N/A root N/A | ||
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[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[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[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[tikv] table:t, range:[-inf,+inf], keep order:false, stats:pseudo |
Oops, something went wrong.