提交 8cf45d0f authored 作者: S.Vladykin's avatar S.Vladykin

wip

上级 c266fa0a
......@@ -103,10 +103,12 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
// we do not support batching for recursive queries
return null;
}
if (query.isUnion()) {
return createLookupBatchUnion((SelectUnion) query);
}
return createLookupBatchSimple((Select) query);
IndexLookupBatch lookupBatch = query.isUnion() ?
createLookupBatchUnion((SelectUnion) query) :
createLookupBatchSimple((Select) query);
// TODO not initialize index cursor on the top table filter but work as usual batching
// TODO return wrapper which goes through all the joins an collects all the rows
return null;
}
private IndexLookupBatch createLookupBatchSimple(Select select) {
......@@ -131,9 +133,14 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
createLookupBatchUnion((SelectUnion) right) :
createLookupBatchSimple((Select) right);
if (leftLookupBatch == null && rightLookupBatch == null) {
if (leftLookupBatch == null) {
if (rightLookupBatch == null) {
return null;
}
leftLookupBatch = null; // TODO
} else if (rightLookupBatch == null) {
rightLookupBatch = null; // TODO
}
return new UnionLookupBatch(leftLookupBatch, rightLookupBatch);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论