提交 da202650 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use fast path in AbstractFunctionCursor for first == null && last == null

上级 6b39b12a
...@@ -62,6 +62,10 @@ abstract class AbstractFunctionCursor implements Cursor { ...@@ -62,6 +62,10 @@ abstract class AbstractFunctionCursor implements Cursor {
@Override @Override
public boolean next() { public boolean next() {
final SearchRow first = this.first, last = this.last;
if (first == null && last == null) {
return nextImpl();
}
while (nextImpl()) { while (nextImpl()) {
Row current = get(); Row current = get();
if (first != null) { if (first != null) {
...@@ -88,4 +92,4 @@ abstract class AbstractFunctionCursor implements Cursor { ...@@ -88,4 +92,4 @@ abstract class AbstractFunctionCursor implements Cursor {
throw DbException.throwInternalError(toString()); throw DbException.throwInternalError(toString());
} }
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论