提交 6b6d6bc7 authored 作者: S.Vladykin's avatar S.Vladykin

minor renaimings

上级 8a96db5a
...@@ -91,8 +91,8 @@ public class TableFilter implements ColumnResolver { ...@@ -91,8 +91,8 @@ public class TableFilter implements ColumnResolver {
/** /**
* Batched join support. * Batched join support.
*/ */
private JoinBatch jbatch; private JoinBatch joinBatch;
private JoinFilter jfilter; private JoinFilter joinFilter;
/** /**
* Indicates that this filter is used in the plan. * Indicates that this filter is used in the plan.
...@@ -334,8 +334,8 @@ public class TableFilter implements ColumnResolver { ...@@ -334,8 +334,8 @@ public class TableFilter implements ColumnResolver {
* @return join batch if query runs over index which supports batched lookups, null otherwise * @return join batch if query runs over index which supports batched lookups, null otherwise
*/ */
public JoinBatch startQuery(Session s) { public JoinBatch startQuery(Session s) {
jbatch = null; joinBatch = null;
jfilter = null; joinFilter = null;
this.session = s; this.session = s;
scanCount = 0; scanCount = 0;
if (nestedJoin != null) { if (nestedJoin != null) {
...@@ -353,8 +353,8 @@ public class TableFilter implements ColumnResolver { ...@@ -353,8 +353,8 @@ public class TableFilter implements ColumnResolver {
if (nestedJoin != null) { if (nestedJoin != null) {
throw DbException.getUnsupportedException("nested join with batched index"); throw DbException.getUnsupportedException("nested join with batched index");
} }
jbatch = batch; joinBatch = batch;
jfilter = batch.register(this); joinFilter = batch.register(this);
} }
return batch; return batch;
} }
...@@ -379,9 +379,9 @@ public class TableFilter implements ColumnResolver { ...@@ -379,9 +379,9 @@ public class TableFilter implements ColumnResolver {
* @return true if there are * @return true if there are
*/ */
public boolean next() { public boolean next() {
if (jbatch != null) { if (joinBatch != null) {
// will happen only on topTableFilter since jbatch.next does not call join.next() // will happen only on topTableFilter since jbatch.next does not call join.next()
return jbatch.next(); return joinBatch.next();
} }
if (state == AFTER_LAST) { if (state == AFTER_LAST) {
return false; return false;
...@@ -942,8 +942,8 @@ public class TableFilter implements ColumnResolver { ...@@ -942,8 +942,8 @@ public class TableFilter implements ColumnResolver {
@Override @Override
public Value getValue(Column column) { public Value getValue(Column column) {
if (jbatch != null) { if (joinBatch != null) {
return jbatch.getValue(jfilter, column); return joinBatch.getValue(joinFilter, column);
} }
if (currentSearchRow == null) { if (currentSearchRow == null) {
return null; return null;
...@@ -1119,13 +1119,13 @@ public class TableFilter implements ColumnResolver { ...@@ -1119,13 +1119,13 @@ public class TableFilter implements ColumnResolver {
/** /**
* This filter joined after this batched join and can be used normally. * This filter joined after this batched join and can be used normally.
*/ */
final TableFilter furtherFilter; final TableFilter additionalFilter;
/** /**
* @param furtherFilter table filter after this batched join. * @param additionalFilter table filter after this batched join.
*/ */
private JoinBatch(TableFilter furtherFilter) { private JoinBatch(TableFilter additionalFilter) {
this.furtherFilter = furtherFilter; this.additionalFilter = additionalFilter;
} }
/** /**
...@@ -1178,7 +1178,7 @@ public class TableFilter implements ColumnResolver { ...@@ -1178,7 +1178,7 @@ public class TableFilter implements ColumnResolver {
start(); start();
started = true; started = true;
} }
if (furtherFilter == null) { if (additionalFilter == null) {
if (batchedNext()) { if (batchedNext()) {
assert current.isComplete(); assert current.isComplete();
return true; return true;
...@@ -1192,10 +1192,10 @@ public class TableFilter implements ColumnResolver { ...@@ -1192,10 +1192,10 @@ public class TableFilter implements ColumnResolver {
} }
assert current.isComplete(); assert current.isComplete();
found = true; found = true;
furtherFilter.reset(); additionalFilter.reset();
} }
// we call furtherFilter in usual way outside of this batch because it is more effective // we call furtherFilter in usual way outside of this batch because it is more effective
if (furtherFilter.next()) { if (additionalFilter.next()) {
return true; return true;
} }
found = false; found = false;
...@@ -1391,11 +1391,11 @@ public class TableFilter implements ColumnResolver { ...@@ -1391,11 +1391,11 @@ public class TableFilter implements ColumnResolver {
return searchRows.size() >= batchSize * 2; return searchRows.size() >= batchSize * 2;
} }
private boolean isOk(boolean ignireJoinCondition) { private boolean isOk(boolean ignoreJoinCondition) {
boolean filterOk = filter.isOk(filter.filterCondition); boolean filterOk = filter.isOk(filter.filterCondition);
boolean joinOk = filter.isOk(filter.joinCondition); boolean joinOk = filter.isOk(filter.joinCondition);
return filterOk && (ignireJoinCondition || joinOk); return filterOk && (ignoreJoinCondition || joinOk);
} }
private boolean collectSearchRows() { private boolean collectSearchRows() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论