Skip to content

Commit

Permalink
move
Browse files Browse the repository at this point in the history
  • Loading branch information
time-and-fate committed Mar 22, 2022
1 parent 7a17b3b commit db79a6d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 25 deletions.
17 changes: 0 additions & 17 deletions cmd/explaintest/r/explain.result
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,3 @@ create view v as select cast(replace(substring_index(substring_index("",',',1),'
desc v;
Field Type Null Key Default Extra
event_id varchar(32) NO NULL
drop table if exists t1, t2;
create table t1 (c_int int, c_decimal decimal(12, 6), primary key (c_int) nonclustered,key((c_int + 1))) ;
create table t2 like t1;
explain format = 'brief' select /*+ agg_to_cop() */ * from t1 where c_decimal in (select c_decimal from t2 where t2.c_int + 1 = 8 + 1);
id estRows task access object operator info
HashJoin 9.99 root inner join, equal:[eq(test.t2.c_decimal, test.t1.c_decimal)]
├─HashAgg(Build) 7.99 root group by:test.t2.c_decimal, funcs:firstrow(test.t2.c_decimal)->test.t2.c_decimal
│ └─IndexLookUp 7.99 root
│ ├─IndexRangeScan(Build) 10.00 cop[tikv] table:t2, index:expression_index(`c_int` + 1) range:[9,9], keep order:false, stats:pseudo
│ └─HashAgg(Probe) 7.99 cop[tikv] group by:test.t2.c_decimal,
│ └─Selection 9.99 cop[tikv] not(isnull(test.t2.c_decimal))
│ └─TableRowIDScan 10.00 cop[tikv] table:t2 keep order:false, stats:pseudo
└─TableReader(Probe) 9990.00 root data:Selection
└─Selection 9990.00 cop[tikv] not(isnull(test.t1.c_decimal))
└─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
drop table t1;
drop table t2;
17 changes: 17 additions & 0 deletions cmd/explaintest/r/explain_generate_column_substitute.result
Original file line number Diff line number Diff line change
Expand Up @@ -617,3 +617,20 @@ select (select t2.c_str from t2 where t2.c_int = 3 order by t2.c_str) x from t1;
x
unruffled chaplygin
drop table t1,t2;
drop table if exists t1, t2;
create table t1 (c_int int, c_decimal decimal(12, 6), primary key (c_int) nonclustered,key((c_int + 1))) ;
create table t2 like t1;
explain format = 'brief' select /*+ agg_to_cop() */ * from t1 where c_decimal in (select c_decimal from t2 where t2.c_int + 1 = 8 + 1);
id estRows task access object operator info
HashJoin 9.99 root inner join, equal:[eq(test.t2.c_decimal, test.t1.c_decimal)]
├─HashAgg(Build) 7.99 root group by:test.t2.c_decimal, funcs:firstrow(test.t2.c_decimal)->test.t2.c_decimal
│ └─IndexLookUp 7.99 root
│ ├─IndexRangeScan(Build) 10.00 cop[tikv] table:t2, index:expression_index(`c_int` + 1) range:[9,9], keep order:false, stats:pseudo
│ └─HashAgg(Probe) 7.99 cop[tikv] group by:test.t2.c_decimal,
│ └─Selection 9.99 cop[tikv] not(isnull(test.t2.c_decimal))
│ └─TableRowIDScan 10.00 cop[tikv] table:t2 keep order:false, stats:pseudo
└─TableReader(Probe) 9990.00 root data:Selection
└─Selection 9990.00 cop[tikv] not(isnull(test.t1.c_decimal))
└─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
drop table t1;
drop table t2;
8 changes: 0 additions & 8 deletions cmd/explaintest/t/explain.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,3 @@ drop table t;
drop view if exists v;
create view v as select cast(replace(substring_index(substring_index("",',',1),':',-1),'"','') as CHAR(32)) as event_id;
desc v;

-- for issue 33237
drop table if exists t1, t2;
create table t1 (c_int int, c_decimal decimal(12, 6), primary key (c_int) nonclustered,key((c_int + 1))) ;
create table t2 like t1;
explain format = 'brief' select /*+ agg_to_cop() */ * from t1 where c_decimal in (select c_decimal from t2 where t2.c_int + 1 = 8 + 1);
drop table t1;
drop table t2;
9 changes: 9 additions & 0 deletions cmd/explaintest/t/explain_generate_column_substitute.test
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,12 @@ select (select t2.c_str from t2 where t2.c_int + 1 = 4 order by t2.c_str) x from
select (select t2.c_str from t2 where t2.c_int = 3 order by t2.c_str) x from t1;

drop table t1,t2;

-- for issue 33237
drop table if exists t1, t2;
create table t1 (c_int int, c_decimal decimal(12, 6), primary key (c_int) nonclustered,key((c_int + 1))) ;
create table t2 like t1;
explain format = 'brief' select /*+ agg_to_cop() */ * from t1 where c_decimal in (select c_decimal from t2 where t2.c_int + 1 = 8 + 1);
drop table t1;
drop table t2;

0 comments on commit db79a6d

Please sign in to comment.