Unverified 提交 7b0abb0e authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #905 from katzyn/join

Move some JOIN tests from testScript.sql to own file
...@@ -2490,8 +2490,7 @@ public class Parser { ...@@ -2490,8 +2490,7 @@ public class Parser {
int idx = filters.indexOf(rightFilter); int idx = filters.indexOf(rightFilter);
if (idx >= 0) { if (idx >= 0) {
filters.remove(idx); filters.remove(idx);
leftFilter.addJoin(rightFilter, true, leftFilter.addJoin(rightFilter, true, false, r);
false, r);
} else { } else {
rightFilter.mapAndAddFilter(r); rightFilter.mapAndAddFilter(r);
} }
......
...@@ -640,8 +640,7 @@ public class TableFilter implements ColumnResolver { ...@@ -640,8 +640,7 @@ public class TableFilter implements ColumnResolver {
* @param nested if this is a nested join * @param nested if this is a nested join
* @param on the join condition * @param on the join condition
*/ */
public void addJoin(TableFilter filter, boolean outer, boolean nested, public void addJoin(TableFilter filter, boolean outer, boolean nested, Expression on) {
final Expression on) {
if (on != null) { if (on != null) {
on.mapColumns(this, 0); on.mapColumns(this, 0);
TableFilterVisitor visitor = new MapColumnsVisitor(on); TableFilterVisitor visitor = new MapColumnsVisitor(on);
...@@ -671,7 +670,7 @@ public class TableFilter implements ColumnResolver { ...@@ -671,7 +670,7 @@ public class TableFilter implements ColumnResolver {
filter.mapAndAddFilter(on); filter.mapAndAddFilter(on);
} }
} else { } else {
join.addJoin(filter, outer, nested, on); join.addJoin(filter, outer, false, on);
} }
} }
} }
......
...@@ -82,6 +82,7 @@ public class TestScript extends TestBase { ...@@ -82,6 +82,7 @@ public class TestScript extends TestBase {
reconnectOften = !config.memory && config.big; reconnectOften = !config.memory && config.big;
testScript("testScript.sql"); testScript("testScript.sql");
testScript("joins.sql");
testScript("altertable-index-reuse.sql"); testScript("altertable-index-reuse.sql");
testScript("query-optimisations.sql"); testScript("query-optimisations.sql");
testScript("commands-dml-script.sql"); testScript("commands-dml-script.sql");
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论