提交 b658e3ed 编写于 作者: R Richard Guo 提交者: Jesse Zhang

Disable shareinputscan with outer refs.

Currently shareinputscan doesn't handle rescan properly, and to fully
support it, there will be a lot of code changes. After some discussions,
we decide to disable shareinputscan with outer refs for now.
上级 42930ed1
......@@ -134,6 +134,15 @@ static ShareInputScan *make_shareinputscan(PlannerInfo *root, Plan *inputplan)
Assert(IsA(inputplan, Material) || IsA(inputplan, Sort));
/*
* Currently GPDB doesn't fully support shareinputscan referencing outer
* rels.
*/
if (!bms_is_empty(inputplan->extParam))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("shareinputscan with outer refs is not supported by GPDB")));
sisc = makeNode(ShareInputScan);
incr_plan_nsharer(inputplan);
......@@ -212,6 +221,8 @@ prepare_plan_for_sharing(PlannerInfo *root, Plan *common)
shared->plan_width = common->plan_width;
shared->dispatch = common->dispatch;
shared->flow = copyObject(common->flow);
shared->extParam = bms_copy(common->extParam);
shared->allParam = bms_copy(common->allParam);
m->share_id = SHARE_ID_NOT_ASSIGNED;
m->share_type = SHARE_MATERIAL;
......
......@@ -30,3 +30,10 @@ SELECT * FROM
---+---+---+---+---+---
(0 rows)
SELECT *,
(
WITH cte AS (SELECT * FROM jazz WHERE jazz.e = bar.c)
SELECT 1 FROM cte c1, cte c2
)
FROM bar;
ERROR: shareinputscan with outer refs is not supported by GPDB
......@@ -27,3 +27,10 @@ SELECT * FROM
JOIN bar ON b = c
) AS XY
JOIN jazz on c = e AND b = f;
SELECT *,
(
WITH cte AS (SELECT * FROM jazz WHERE jazz.e = bar.c)
SELECT 1 FROM cte c1, cte c2
)
FROM bar;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册