Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
0fa0f09c
提交
0fa0f09c
authored
11月 18, 2015
作者:
S.Vladykin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip
上级
0dd766c9
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
10 行增加
和
14 行删除
+10
-14
JoinBatch.java
h2/src/main/org/h2/table/JoinBatch.java
+10
-14
没有找到文件。
h2/src/main/org/h2/table/JoinBatch.java
浏览文件 @
0fa0f09c
...
@@ -60,7 +60,7 @@ public final class JoinBatch {
...
@@ -60,7 +60,7 @@ public final class JoinBatch {
private
static
final
Future
<
Cursor
>
PLACEHOLDER
=
new
DoneFuture
<
Cursor
>(
null
);
private
static
final
Future
<
Cursor
>
PLACEHOLDER
=
new
DoneFuture
<
Cursor
>(
null
);
private
ViewIndexLookupBatch
lookupBatchWrapper
;
private
ViewIndexLookupBatch
viewIndexLookupBatch
;
private
JoinFilter
[]
filters
;
private
JoinFilter
[]
filters
;
private
JoinFilter
top
;
private
JoinFilter
top
;
...
@@ -156,7 +156,7 @@ public final class JoinBatch {
...
@@ -156,7 +156,7 @@ public final class JoinBatch {
private
void
start
()
{
private
void
start
()
{
// initialize current row
// initialize current row
current
=
new
JoinRow
(
new
Object
[
filters
.
length
]);
current
=
new
JoinRow
(
new
Object
[
filters
.
length
]);
if
(
lookupBatchWrapper
==
null
)
{
if
(
viewIndexLookupBatch
==
null
)
{
current
.
updateRow
(
top
.
id
,
top
.
filter
.
getIndexCursor
(),
JoinRow
.
S_NULL
,
JoinRow
.
S_CURSOR
);
current
.
updateRow
(
top
.
id
,
top
.
filter
.
getIndexCursor
(),
JoinRow
.
S_NULL
,
JoinRow
.
S_CURSOR
);
// initialize top cursor
// initialize top cursor
top
.
filter
.
getIndexCursor
().
find
(
top
.
filter
.
getSession
(),
top
.
filter
.
getIndexConditions
());
top
.
filter
.
getIndexCursor
().
find
(
top
.
filter
.
getSession
(),
top
.
filter
.
getIndexConditions
());
...
@@ -352,10 +352,10 @@ public final class JoinBatch {
...
@@ -352,10 +352,10 @@ public final class JoinBatch {
* @return Adapter to allow joining to this batch in sub-queries.
* @return Adapter to allow joining to this batch in sub-queries.
*/
*/
public
IndexLookupBatch
asViewIndexLookupBatch
(
ViewIndex
viewIndex
)
{
public
IndexLookupBatch
asViewIndexLookupBatch
(
ViewIndex
viewIndex
)
{
if
(
lookupBatchWrapper
==
null
)
{
if
(
viewIndexLookupBatch
==
null
)
{
lookupBatchWrapper
=
new
ViewIndexLookupBatch
(
viewIndex
);
viewIndexLookupBatch
=
new
ViewIndexLookupBatch
(
viewIndex
);
}
}
return
lookupBatchWrapper
;
return
viewIndexLookupBatch
;
}
}
@Override
@Override
...
@@ -685,6 +685,7 @@ public final class JoinBatch {
...
@@ -685,6 +685,7 @@ public final class JoinBatch {
private
final
ViewIndex
viewIndex
;
private
final
ViewIndex
viewIndex
;
private
final
ArrayList
<
Future
<
Cursor
>>
result
=
New
.
arrayList
();
private
final
ArrayList
<
Future
<
Cursor
>>
result
=
New
.
arrayList
();
private
boolean
findCalled
;
private
boolean
findCalled
;
private
boolean
full
;
private
ViewIndexLookupBatch
(
ViewIndex
viewIndex
)
{
private
ViewIndexLookupBatch
(
ViewIndex
viewIndex
)
{
this
.
viewIndex
=
viewIndex
;
this
.
viewIndex
=
viewIndex
;
...
@@ -707,6 +708,10 @@ public final class JoinBatch {
...
@@ -707,6 +708,10 @@ public final class JoinBatch {
}
}
}
}
private
void
fetch
()
{
}
@Override
@Override
public
boolean
isBatchFull
()
{
public
boolean
isBatchFull
()
{
assert
!
findCalled
;
assert
!
findCalled
;
...
@@ -715,15 +720,6 @@ public final class JoinBatch {
...
@@ -715,15 +720,6 @@ public final class JoinBatch {
@Override
@Override
public
List
<
Future
<
Cursor
>>
find
()
{
public
List
<
Future
<
Cursor
>>
find
()
{
JoinBatch
jb
=
JoinBatch
.
this
;
List
<
Future
<
Cursor
>>
topCursors
=
top
.
find
();
for
(
int
i
=
0
;
i
<
topCursors
.
size
();
i
++)
{
// jb.setCursor
while
(
jb
.
next
())
{
// collect result
}
}
findCalled
=
true
;
findCalled
=
true
;
return
result
;
return
result
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论