提交 1952fe67 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use this instance instead of parameter in TableFilter.setScanIndexes()

上级 673da9af
...@@ -266,34 +266,32 @@ public class TableFilter implements ColumnResolver { ...@@ -266,34 +266,32 @@ public class TableFilter implements ColumnResolver {
if (item.getNestedJoinPlan() != null) { if (item.getNestedJoinPlan() != null) {
nestedJoin.setPlanItem(item.getNestedJoinPlan()); nestedJoin.setPlanItem(item.getNestedJoinPlan());
} else { } else {
setScanIndexes(nestedJoin); nestedJoin.setScanIndexes();
} }
} }
if (join != null) { if (join != null) {
if (item.getJoinPlan() != null) { if (item.getJoinPlan() != null) {
join.setPlanItem(item.getJoinPlan()); join.setPlanItem(item.getJoinPlan());
} else { } else {
setScanIndexes(join); join.setScanIndexes();
} }
} }
} }
/** /**
* Set all missing indexes to scan indexes recursively. * Set all missing indexes to scan indexes recursively.
*
* @param table filter to start from
*/ */
private void setScanIndexes(TableFilter filter) { private void setScanIndexes() {
if (filter.getIndex() == null) { if (index == null) {
filter.setIndex(filter.getTable().getScanIndex(session)); setIndex(table.getScanIndex(session));
} }
TableFilter j = filter.join; TableFilter j = join;
if (j != null) { if (j != null) {
setScanIndexes(j); j.setScanIndexes();
} }
j = filter.nestedJoin; j = nestedJoin;
if (j != null) { if (j != null) {
setScanIndexes(j); j.setScanIndexes();
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论