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

wip

上级 c266fa0a
...@@ -103,10 +103,12 @@ public class ViewIndex extends BaseIndex implements SpatialIndex { ...@@ -103,10 +103,12 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
// we do not support batching for recursive queries // we do not support batching for recursive queries
return null; return null;
} }
if (query.isUnion()) { IndexLookupBatch lookupBatch = query.isUnion() ?
return createLookupBatchUnion((SelectUnion) query); createLookupBatchUnion((SelectUnion) query) :
} createLookupBatchSimple((Select) query);
return 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) { private IndexLookupBatch createLookupBatchSimple(Select select) {
...@@ -131,8 +133,13 @@ public class ViewIndex extends BaseIndex implements SpatialIndex { ...@@ -131,8 +133,13 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
createLookupBatchUnion((SelectUnion) right) : createLookupBatchUnion((SelectUnion) right) :
createLookupBatchSimple((Select) right); createLookupBatchSimple((Select) right);
if (leftLookupBatch == null && rightLookupBatch == null) { if (leftLookupBatch == null) {
return null; if (rightLookupBatch == null) {
return null;
}
leftLookupBatch = null; // TODO
} else if (rightLookupBatch == null) {
rightLookupBatch = null; // TODO
} }
return new UnionLookupBatch(leftLookupBatch, rightLookupBatch); return new UnionLookupBatch(leftLookupBatch, rightLookupBatch);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论