Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
6b6d6bc7
提交
6b6d6bc7
authored
10月 21, 2015
作者:
S.Vladykin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor renaimings
上级
8a96db5a
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
19 行增加
和
19 行删除
+19
-19
TableFilter.java
h2/src/main/org/h2/table/TableFilter.java
+19
-19
没有找到文件。
h2/src/main/org/h2/table/TableFilter.java
浏览文件 @
6b6d6bc7
...
...
@@ -91,8 +91,8 @@ public class TableFilter implements ColumnResolver {
/**
* Batched join support.
*/
private
JoinBatch
j
b
atch
;
private
JoinFilter
j
f
ilter
;
private
JoinBatch
j
oinB
atch
;
private
JoinFilter
j
oinF
ilter
;
/**
* Indicates that this filter is used in the plan.
...
...
@@ -334,8 +334,8 @@ public class TableFilter implements ColumnResolver {
* @return join batch if query runs over index which supports batched lookups, null otherwise
*/
public
JoinBatch
startQuery
(
Session
s
)
{
j
b
atch
=
null
;
j
f
ilter
=
null
;
j
oinB
atch
=
null
;
j
oinF
ilter
=
null
;
this
.
session
=
s
;
scanCount
=
0
;
if
(
nestedJoin
!=
null
)
{
...
...
@@ -353,8 +353,8 @@ public class TableFilter implements ColumnResolver {
if
(
nestedJoin
!=
null
)
{
throw
DbException
.
getUnsupportedException
(
"nested join with batched index"
);
}
j
b
atch
=
batch
;
j
f
ilter
=
batch
.
register
(
this
);
j
oinB
atch
=
batch
;
j
oinF
ilter
=
batch
.
register
(
this
);
}
return
batch
;
}
...
...
@@ -379,9 +379,9 @@ public class TableFilter implements ColumnResolver {
* @return true if there are
*/
public
boolean
next
()
{
if
(
j
b
atch
!=
null
)
{
if
(
j
oinB
atch
!=
null
)
{
// will happen only on topTableFilter since jbatch.next does not call join.next()
return
j
b
atch
.
next
();
return
j
oinB
atch
.
next
();
}
if
(
state
==
AFTER_LAST
)
{
return
false
;
...
...
@@ -942,8 +942,8 @@ public class TableFilter implements ColumnResolver {
@Override
public
Value
getValue
(
Column
column
)
{
if
(
j
b
atch
!=
null
)
{
return
j
batch
.
getValue
(
jf
ilter
,
column
);
if
(
j
oinB
atch
!=
null
)
{
return
j
oinBatch
.
getValue
(
joinF
ilter
,
column
);
}
if
(
currentSearchRow
==
null
)
{
return
null
;
...
...
@@ -1119,13 +1119,13 @@ public class TableFilter implements ColumnResolver {
/**
* This filter joined after this batched join and can be used normally.
*/
final
TableFilter
further
Filter
;
final
TableFilter
additional
Filter
;
/**
* @param
further
Filter table filter after this batched join.
* @param
additional
Filter table filter after this batched join.
*/
private
JoinBatch
(
TableFilter
further
Filter
)
{
this
.
furtherFilter
=
further
Filter
;
private
JoinBatch
(
TableFilter
additional
Filter
)
{
this
.
additionalFilter
=
additional
Filter
;
}
/**
...
...
@@ -1178,7 +1178,7 @@ public class TableFilter implements ColumnResolver {
start
();
started
=
true
;
}
if
(
further
Filter
==
null
)
{
if
(
additional
Filter
==
null
)
{
if
(
batchedNext
())
{
assert
current
.
isComplete
();
return
true
;
...
...
@@ -1192,10 +1192,10 @@ public class TableFilter implements ColumnResolver {
}
assert
current
.
isComplete
();
found
=
true
;
further
Filter
.
reset
();
additional
Filter
.
reset
();
}
// we call furtherFilter in usual way outside of this batch because it is more effective
if
(
further
Filter
.
next
())
{
if
(
additional
Filter
.
next
())
{
return
true
;
}
found
=
false
;
...
...
@@ -1391,11 +1391,11 @@ public class TableFilter implements ColumnResolver {
return
searchRows
.
size
()
>=
batchSize
*
2
;
}
private
boolean
isOk
(
boolean
ign
i
reJoinCondition
)
{
private
boolean
isOk
(
boolean
ign
o
reJoinCondition
)
{
boolean
filterOk
=
filter
.
isOk
(
filter
.
filterCondition
);
boolean
joinOk
=
filter
.
isOk
(
filter
.
joinCondition
);
return
filterOk
&&
(
ign
i
reJoinCondition
||
joinOk
);
return
filterOk
&&
(
ign
o
reJoinCondition
||
joinOk
);
}
private
boolean
collectSearchRows
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论