Skip to content

Commit

Permalink
Merge branch 'release-2.1' into zimuxia/drop-col
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala committed Dec 20, 2019
2 parents 35a8cef + 547a855 commit 862df1a
Show file tree
Hide file tree
Showing 39 changed files with 56,325 additions and 170 deletions.
2 changes: 1 addition & 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)))
export PATH := $(path_to_add):$(PATH)

GO := GO111MODULE=on go
GOBUILD := CGO_ENABLED=1 $(GO) build $(BUILD_FLAG) -trimpath
GOBUILD := CGO_ENABLED=1 $(GO) build $(BUILD_FLAG)
GOTEST := CGO_ENABLED=1 $(GO) test -p 3
OVERALLS := CGO_ENABLED=1 overalls
GOVERALLS := goveralls
Expand Down
31 changes: 31 additions & 0 deletions cmd/explaintest/r/explain_union_scan.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
drop table if exists city;
CREATE TABLE `city` (
`id` varchar(70) NOT NULL,
`province_id` int(15) DEFAULT NULL,
`city_name` varchar(90) DEFAULT NULL,
`description` varchar(90) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
load stats "s/explain_union_scan.json";
insert into city values("06766b3ef41d484d8878606393f1ed0b", 88, "chongqing", "chongqing city");
begin;
update city set province_id = 77 where id="06766b3ef41d484d8878606393f1ed0b";
explain select t1.*, t2.province_id as provinceID, t2.city_name as cityName, t3.description as description from city t1 inner join city t2 on t1.id = t2.id left join city t3 on t1.province_id = t3.province_id where t1.province_id > 1 and t1.province_id < 100 limit 10;
id count task operator info
Projection_16 10.00 root test.t1.id, test.t1.province_id, test.t1.city_name, test.t1.description, test.t2.province_id, test.t2.city_name, test.t3.description
└─Limit_19 10.00 root offset:0, count:10
└─HashLeftJoin_20 10.00 root left outer join, inner:UnionScan_51, equal:[eq(test.t1.province_id, test.t3.province_id)]
├─Limit_23 10.00 root offset:0, count:10
│ └─IndexJoin_28 10.00 root inner join, inner:UnionScan_27, outer key:test.t1.id, inner key:test.t2.id
│ ├─UnionScan_37 10.00 root gt(test.t1.province_id, 1), lt(test.t1.province_id, 100)
│ │ └─TableReader_40 10.00 root data:Selection_39
│ │ └─Selection_39 10.00 cop gt(test.t1.province_id, 1), lt(test.t1.province_id, 100)
│ │ └─TableScan_38 10.33 cop table:city, range:[-inf,+inf], keep order:false
│ └─UnionScan_27 1.00 root
│ └─IndexLookUp_26 1.00 root
│ ├─IndexScan_24 1.00 cop table:city, index:id, range: decided by [test.t1.id], keep order:false
│ └─TableScan_25 1.00 cop table:city, keep order:false
└─UnionScan_51 536284.00 root
└─TableReader_53 536284.00 root data:TableScan_52
└─TableScan_52 536284.00 cop table:city, range:[-inf,+inf], keep order:false
commit;
Loading

0 comments on commit 862df1a

Please sign in to comment.