Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
1ae03e79
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1ae03e79
编写于
4月 25, 2019
作者:
H
Hans Zeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bump ORCA version to 3.37 (from 3.35)
Also add a few more tests for unions to ICG.
上级
c6d277c1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
112 addition
and
49 deletion
+112
-49
config/orca.m4
config/orca.m4
+2
-2
configure
configure
+2
-2
depends/conanfile_orca.txt
depends/conanfile_orca.txt
+1
-1
gpAux/releng/releng.mk
gpAux/releng/releng.mk
+2
-2
src/test/regress/expected/gporca_optimizer.out
src/test/regress/expected/gporca_optimizer.out
+40
-42
src/test/regress/expected/union_gp.out
src/test/regress/expected/union_gp.out
+45
-0
src/test/regress/sql/union_gp.sql
src/test/regress/sql/union_gp.sql
+20
-0
未找到文件。
config/orca.m4
浏览文件 @
1ae03e79
...
...
@@ -40,10 +40,10 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <string.h>
]],
[
return strncmp("3.3
5
.", GPORCA_VERSION_STRING, 5);
return strncmp("3.3
7
.", GPORCA_VERSION_STRING, 5);
])],
[AC_MSG_RESULT([[ok]])],
[AC_MSG_ERROR([Your ORCA version is expected to be 3.3
5
.XXX])]
[AC_MSG_ERROR([Your ORCA version is expected to be 3.3
7
.XXX])]
)
AC_LANG_POP([C++])
])# PGAC_CHECK_ORCA_VERSION
...
...
configure
浏览文件 @
1ae03e79
...
...
@@ -13995,7 +13995,7 @@ int
main ()
{
return strncmp("3.3
5
.", GPORCA_VERSION_STRING, 5);
return strncmp("3.3
7
.", GPORCA_VERSION_STRING, 5);
;
return 0;
...
...
@@ -14005,7 +14005,7 @@ if ac_fn_cxx_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
else
as_fn_error $? "Your ORCA version is expected to be 3.3
5
.XXX" "$LINENO" 5
as_fn_error $? "Your ORCA version is expected to be 3.3
7
.XXX" "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
...
...
depends/conanfile_orca.txt
浏览文件 @
1ae03e79
[requires]
orca/v3.3
5
.0@gpdb/stable
orca/v3.3
7
.0@gpdb/stable
[imports]
include, * -> build/include
...
...
gpAux/releng/releng.mk
浏览文件 @
1ae03e79
...
...
@@ -88,9 +88,9 @@ sync_tools: opt_write_test
ifeq
"$(findstring aix,$(BLD_ARCH))" ""
ifeq
"$(findstring sles,$(BLD_ARCH))" ""
LD_LIBRARY_PATH
=
''
wget
--no-check-certificate
-q
-O
- https://github.com/greenplum-db/gporca/archive/v3.3
5
.0.tar.gz |
tar
zxf -
-C
$(BLD_TOP)
/ext/
$(BLD_ARCH)
LD_LIBRARY_PATH
=
''
wget
--no-check-certificate
-q
-O
- https://github.com/greenplum-db/gporca/archive/v3.3
7
.0.tar.gz |
tar
zxf -
-C
$(BLD_TOP)
/ext/
$(BLD_ARCH)
else
LD_LIBRARY_PATH
=
''
wget
--no-check-certificate
-q
-O
- https://github.com/greenplum-db/gporca/releases/download/v3.3
5
.0/bin_orca_centos5_release.tar.gz |
tar
zxf -
-C
$(BLD_TOP)
/ext/
$(BLD_ARCH)
LD_LIBRARY_PATH
=
''
wget
--no-check-certificate
-q
-O
- https://github.com/greenplum-db/gporca/releases/download/v3.3
7
.0/bin_orca_centos5_release.tar.gz |
tar
zxf -
-C
$(BLD_TOP)
/ext/
$(BLD_ARCH)
endif
endif
...
...
src/test/regress/expected/gporca_optimizer.out
浏览文件 @
1ae03e79
...
...
@@ -8271,14 +8271,13 @@ explain select * from orca.t_date where user_id=9;
-> Sequence (cost=0.00..437.00 rows=1 width=20)
-> Partition Selector for t_date (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 6 (out of 6)
-> Result (cost=0.00..437.00 rows=1 width=20)
-> Append (cost=0.00..437.00 rows=1 width=20)
-> Dynamic Index Scan on t_date (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=50)
Index Cond: user_id = 9::numeric
-> Dynamic Seq Scan on t_date t_date_1 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=50)
Filter: user_id = 9::numeric
Optimizer: Pivotal Optimizer (GPORCA) version 2.74.0
(11 rows)
-> Append (cost=0.00..437.00 rows=1 width=20)
-> Dynamic Index Scan on t_date (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=20)
Index Cond: (user_id = 9::numeric)
-> Dynamic Seq Scan on t_date t_date_1 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=20)
Filter: (user_id = 9::numeric)
Optimizer: Pivotal Optimizer (GPORCA) version 3.35.0
(10 rows)
select * from orca.t_date where user_id=9;
timest | user_id | tag1 | tag2
...
...
@@ -8325,14 +8324,13 @@ explain select * from orca.t_text where user_id=9;
-> Sequence (cost=0.00..437.00 rows=1 width=20)
-> Partition Selector for t_text (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 3 (out of 3)
-> Result (cost=0.00..437.00 rows=1 width=20)
-> Append (cost=0.00..437.00 rows=1 width=20)
-> Dynamic Index Scan on t_text (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=50)
Index Cond: user_id = 9::numeric
-> Dynamic Seq Scan on t_text t_text_1 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=50)
Filter: user_id = 9::numeric
Optimizer: Pivotal Optimizer (GPORCA) version 2.74.0
(11 rows)
-> Append (cost=0.00..437.00 rows=1 width=20)
-> Dynamic Index Scan on t_text (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=20)
Index Cond: (user_id = 9::numeric)
-> Dynamic Seq Scan on t_text t_text_1 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=20)
Filter: (user_id = 9::numeric)
Optimizer: Pivotal Optimizer (GPORCA) version 3.35.0
(10 rows)
select * from orca.t_text where user_id=9;
timest | user_id | tag1 | tag2
...
...
@@ -8434,14 +8432,13 @@ explain select * from orca.t_ceeval_ints where user_id=4;
-> Sequence (cost=0.00..437.00 rows=1 width=21)
-> Partition Selector for t_ceeval_ints (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 3 (out of 3)
-> Result (cost=0.00..437.00 rows=1 width=21)
-> Append (cost=0.00..437.00 rows=1 width=21)
-> Dynamic Index Scan on t_ceeval_ints (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=51)
Index Cond: user_id = 4::numeric
-> Dynamic Seq Scan on t_ceeval_ints t_ceeval_ints_1 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=51)
Filter: user_id = 4::numeric
Optimizer: Pivotal Optimizer (GPORCA) version 2.74.0
(11 rows)
-> Append (cost=0.00..437.00 rows=1 width=21)
-> Dynamic Index Scan on t_ceeval_ints (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=21)
Index Cond: (user_id = 4::numeric)
-> Dynamic Seq Scan on t_ceeval_ints t_ceeval_ints_1 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=21)
Filter: (user_id = 4::numeric)
Optimizer: Pivotal Optimizer (GPORCA) version 3.35.0
(10 rows)
select * from orca.t_ceeval_ints where user_id=4;
user_id | category_id | tag1 | tag2
...
...
@@ -10104,24 +10101,25 @@ ORDER BY 1 asc ;
-> Sequence (cost=0.00..874.01 rows=1 width=8)
-> Partition Selector for my_tq_agg_opt_part (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 2 (out of 2)
-> Result (cost=0.00..874.01 rows=1 width=8)
-> Append (cost=0.00..874.01 rows=1 width=8)
-> Nested Loop (cost=0.00..437.00 rows=1 width=132)
Join Filter: true
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=62)
-> Shared Scan (share slice:id 1:0) (cost=0.00..431.00 rows=1 width=62)
-> Dynamic Index Scan on my_tq_agg_opt_part (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=70)
Index Cond: ets <= share0_ref2.event_ts AND end_ts > share0_ref2.event_ts
Filter: sym::bpchar = share0_ref2.symbol AND bid_price::numeric < share0_ref2.trade_price
-> Nested Loop (cost=0.00..437.00 rows=1 width=132)
Join Filter: true
-> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=62)
-> Shared Scan (share slice:id 2:0) (cost=0.00..431.00 rows=1 width=62)
-> Dynamic Index Scan on my_tq_agg_opt_part my_tq_agg_opt_part_1 (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=70)
Index Cond: ets <= share0_ref3.event_ts
Filter: sym::bpchar = share0_ref3.symbol AND bid_price::numeric < share0_ref3.trade_price AND share0_ref3.event_ts < end_ts
Optimizer: Pivotal Optimizer (GPORCA) version 2.74.0
(34 rows)
-> Append (cost=0.00..874.00 rows=1 width=8)
-> Nested Loop (cost=0.00..437.00 rows=1 width=8)
Join Filter: true
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=24)
-> Result (cost=0.00..431.00 rows=1 width=24)
-> Shared Scan (share slice:id 1:0) (cost=0.00..431.00 rows=1 width=24)
-> Dynamic Index Scan on my_tq_agg_opt_part (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=1)
Index Cond: ((ets <= share0_ref2.event_ts) AND (end_ts > share0_ref2.event_ts))
Filter: (((sym)::bpchar = share0_ref2.symbol) AND (plusone(bid_price) < share0_ref2.trade_price))
-> Nested Loop (cost=0.00..437.00 rows=1 width=8)
Join Filter: true
-> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=24)
-> Result (cost=0.00..431.00 rows=1 width=24)
-> Shared Scan (share slice:id 2:0) (cost=0.00..431.00 rows=1 width=24)
-> Dynamic Index Scan on my_tq_agg_opt_part my_tq_agg_opt_part_1 (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=1)
Index Cond: (ets <= share0_ref3.event_ts)
Filter: (((sym)::bpchar = share0_ref3.symbol) AND (plusone(bid_price) < share0_ref3.trade_price) AND (share0_ref3.event_ts < end_ts))
Optimizer: Pivotal Optimizer (GPORCA) version 3.35.0
(35 rows)
reset optimizer_segments;
reset optimizer_enable_constant_expression_evaluation;
...
...
src/test/regress/expected/union_gp.out
浏览文件 @
1ae03e79
...
...
@@ -1927,9 +1927,54 @@ ORDER BY a;
5
(4 rows)
create table t1_ncols(a int, b int, c text, d date) distributed by (a);
create table t2_ncols(a smallint, b bigint, c varchar(20), d date) distributed by (c, b)
partition by range (a) (start (0) end (8) every (4));
NOTICE: CREATE TABLE will create partition "t2_ncols_1_prt_1" for table "t2_ncols"
NOTICE: CREATE TABLE will create partition "t2_ncols_1_prt_2" for table "t2_ncols"
create view v1_ncols(id, a, b, c, d) as select 1,* from t1_ncols union all select 2,* from t2_ncols;
insert into t1_ncols values (1, 11, 'one', '2001-01-01');
insert into t2_ncols values (2, 22, 'two', '2002-02-02');
insert into t2_ncols values (4, 44, 'four','2004-04-04');
select b from t1_ncols union all select a from t2_ncols;
b
----
4
2
11
(3 rows)
select a+100, b, d from t1_ncols union select b, a+200, d from t2_ncols order by 1;
?column? | b | d
----------+-----+------------
22 | 202 | 02-02-2002
44 | 204 | 04-04-2004
101 | 11 | 01-01-2001
(3 rows)
select c, a from v1_ncols;
c | a
------+---
one | 1
four | 4
two | 2
(3 rows)
with cte1(aa, b, c, d) as (select a*100, b, c, d from t1_ncols union select * from t2_ncols)
select x.aa/100 aaa, x.c, y.c from cte1 x join cte1 y on x.aa=y.aa;
aaa | c | c
-----+------+------
0 | two | two
0 | four | four
1 | one | one
(3 rows)
--
-- Clean up
--
DROP TABLE IF EXISTS T_a1 CASCADE;
DROP TABLE IF EXISTS T_b2 CASCADE;
DROP TABLE IF EXISTS T_random CASCADE;
DROP VIEW IF EXISTS v1_ncols CASCADE;
DROP TABLE IF EXISTS t1_ncols CASCADE;
DROP TABLE IF EXISTS t2_ncols CASCADE;
src/test/regress/sql/union_gp.sql
浏览文件 @
1ae03e79
...
...
@@ -540,6 +540,23 @@ UNION
(
SELECT
a
FROM
t2_setop
EXCEPT
SELECT
a
FROM
t1_setop
ORDER
BY
a
)
ORDER
BY
a
;
create
table
t1_ncols
(
a
int
,
b
int
,
c
text
,
d
date
)
distributed
by
(
a
);
create
table
t2_ncols
(
a
smallint
,
b
bigint
,
c
varchar
(
20
),
d
date
)
distributed
by
(
c
,
b
)
partition
by
range
(
a
)
(
start
(
0
)
end
(
8
)
every
(
4
));
create
view
v1_ncols
(
id
,
a
,
b
,
c
,
d
)
as
select
1
,
*
from
t1_ncols
union
all
select
2
,
*
from
t2_ncols
;
insert
into
t1_ncols
values
(
1
,
11
,
'one'
,
'2001-01-01'
);
insert
into
t2_ncols
values
(
2
,
22
,
'two'
,
'2002-02-02'
);
insert
into
t2_ncols
values
(
4
,
44
,
'four'
,
'2004-04-04'
);
select
b
from
t1_ncols
union
all
select
a
from
t2_ncols
;
select
a
+
100
,
b
,
d
from
t1_ncols
union
select
b
,
a
+
200
,
d
from
t2_ncols
order
by
1
;
select
c
,
a
from
v1_ncols
;
with
cte1
(
aa
,
b
,
c
,
d
)
as
(
select
a
*
100
,
b
,
c
,
d
from
t1_ncols
union
select
*
from
t2_ncols
)
select
x
.
aa
/
100
aaa
,
x
.
c
,
y
.
c
from
cte1
x
join
cte1
y
on
x
.
aa
=
y
.
aa
;
--
-- Clean up
--
...
...
@@ -547,3 +564,6 @@ ORDER BY a;
DROP
TABLE
IF
EXISTS
T_a1
CASCADE
;
DROP
TABLE
IF
EXISTS
T_b2
CASCADE
;
DROP
TABLE
IF
EXISTS
T_random
CASCADE
;
DROP
VIEW
IF
EXISTS
v1_ncols
CASCADE
;
DROP
TABLE
IF
EXISTS
t1_ncols
CASCADE
;
DROP
TABLE
IF
EXISTS
t2_ncols
CASCADE
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录