提交 e96c3246 authored 作者: Noel Grandin's avatar Noel Grandin

Merge branch 'igelbox-with-in'

...@@ -2765,6 +2765,9 @@ public class Parser { ...@@ -2765,6 +2765,9 @@ public class Parser {
if (isToken("SELECT") || isToken("FROM")) { if (isToken("SELECT") || isToken("FROM")) {
Query query = parseSelect(); Query query = parseSelect();
r = new Subquery(query); r = new Subquery(query);
} else if (readIf("WITH")) {
Query query = parseWith();
r = new Subquery(query);
} else { } else {
throw getSyntaxError(); throw getSyntaxError();
} }
......
...@@ -147,6 +147,10 @@ public class TestRecursiveQueries extends TestBase { ...@@ -147,6 +147,10 @@ public class TestRecursiveQueries extends TestBase {
new int[]{ Types.INTEGER, Types.VARCHAR, Types.TIMESTAMP }, new int[]{ Types.INTEGER, Types.VARCHAR, Types.TIMESTAMP },
null, null); null, null);
rs = stat.executeQuery("select x from system_range(1,5) "
+ "where x not in (with w(x) as (select 1 union all select x+1 from w where x<3) select x from w)");
assertResultSetOrdered(rs, new String[][]{{"4"}, {"5"}});
conn.close(); conn.close();
deleteDb("recursiveQueries"); deleteDb("recursiveQueries");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论