提交 faffc4d7 编写于 作者: V Venkatesh Raghavan

Update GPORCA fallback messages when optimizer_enable_ctas is set to off

上级 7d626ac6
......@@ -408,7 +408,7 @@ CTranslatorQueryToDXL::CheckSupportedCmdType
{
if (!optimizer_enable_ctas && NULL != pquery->intoClause)
{
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiQuery2DXLUnsupportedFeature, GPOS_WSZ_LIT("CTAS"));
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiQuery2DXLUnsupportedFeature, GPOS_WSZ_LIT("CTAS. Set optimizer_enable_ctas to on to enable CTAS with GPORCA"));
}
// supported: regular select or CTAS when it is enabled
......
......@@ -10132,6 +10132,13 @@ explain select * from foo where b in ('1', '2');
Optimizer status: legacy query optimizer
(5 rows)
set optimizer_enable_ctas = off;
set client_min_messages='log';
create table foo_ctas(a) as (select generate_series(1,10)) distributed by (a);
LOG: statement: create table foo_ctas(a) as (select generate_series(1,10)) distributed by (a);
reset client_min_messages;
LOG: statement: reset client_min_messages;
reset optimizer_enable_ctas;
-- clean up
drop schema orca cascade;
NOTICE: drop cascades to table orca.index_test
......
......@@ -10188,6 +10188,16 @@ explain select * from foo where b in ('1', '2');
Optimizer status: PQO version 2.1
(5 rows)
set optimizer_enable_ctas = off;
set client_min_messages='log';
create table foo_ctas(a) as (select generate_series(1,10)) distributed by (a);
LOG: statement: create table foo_ctas(a) as (select generate_series(1,10)) distributed by (a);
LOG: 2017-05-31 14:43:22:338568 PDT,THD000,NOTICE,"Feature not supported by the Pivotal Query Optimizer: CTAS. Set optimizer_enable_ctas to on to enable CTAS with GPORCA",
INFO: GPORCA failed to produce a plan, falling back to planner
LOG: Planner produced plan :0
reset client_min_messages;
LOG: statement: reset client_min_messages;
reset optimizer_enable_ctas;
-- clean up
drop schema orca cascade;
NOTICE: drop cascades to table orca.index_test
......
......@@ -1398,6 +1398,12 @@ create table foo (a int, b character varying(10));
-- Query should not fallback to planner
explain select * from foo where b in ('1', '2');
set optimizer_enable_ctas = off;
set client_min_messages='log';
create table foo_ctas(a) as (select generate_series(1,10)) distributed by (a);
reset client_min_messages;
reset optimizer_enable_ctas;
-- clean up
drop schema orca cascade;
reset optimizer_segments;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册