提交 7f4d863a authored 作者: Julien Millau's avatar Julien Millau

Add missing schema name with recursive view

上级 7a2a5446
...@@ -778,7 +778,7 @@ public class TableFilter implements ColumnResolver { ...@@ -778,7 +778,7 @@ public class TableFilter implements ColumnResolver {
return buff.toString(); return buff.toString();
} }
if (table.isView() && ((TableView) table).isRecursive()) { if (table.isView() && ((TableView) table).isRecursive()) {
buff.append(table.getName()); buff.append(table.getSchema().getSQL()).append('.').append(table.getName());
} else { } else {
buff.append(table.getSQL()); buff.append(table.getSQL());
} }
......
...@@ -6,7 +6,7 @@ explain with recursive r(n) as ( ...@@ -6,7 +6,7 @@ explain with recursive r(n) as (
(select 1) union all (select n+1 from r where n < 3) (select 1) union all (select n+1 from r where n < 3)
) )
select n from r; select n from r;
>> WITH RECURSIVE R(N) AS ( (SELECT 1 FROM SYSTEM_RANGE(1, 1) /* PUBLIC.RANGE_INDEX */) UNION ALL (SELECT (N + 1) FROM PUBLIC.R /* PUBLIC.R.tableScan */ WHERE N < 3) ) SELECT N FROM R R /* null */ >> WITH RECURSIVE R(N) AS ( (SELECT 1 FROM SYSTEM_RANGE(1, 1) /* PUBLIC.RANGE_INDEX */) UNION ALL (SELECT (N + 1) FROM PUBLIC.R /* PUBLIC.R.tableScan */ WHERE N < 3) ) SELECT N FROM PUBLIC.R R /* null */
select sum(n) from ( select sum(n) from (
with recursive r(n) as ( with recursive r(n) as (
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论