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

Replace switch with if-else in complexIterator()

上级 fd8b73f4
...@@ -473,12 +473,9 @@ public final class WindowFrame { ...@@ -473,12 +473,9 @@ public final class WindowFrame {
int startIndex, int endIndex, boolean reverse) { int startIndex, int endIndex, boolean reverse) {
BitSet set = new BitSet(endIndex + 1); BitSet set = new BitSet(endIndex + 1);
set.set(startIndex, endIndex + 1); set.set(startIndex, endIndex + 1);
switch (exclusion) { if (exclusion == WindowFrameExclusion.EXCLUDE_CURRENT_ROW) {
case EXCLUDE_CURRENT_ROW:
set.clear(currentRow); set.clear(currentRow);
break; } else {
case EXCLUDE_GROUP:
case EXCLUDE_TIES: {
int exStart = toGroupStart(orderedRows, sortOrder, currentRow, startIndex); int exStart = toGroupStart(orderedRows, sortOrder, currentRow, startIndex);
int exEnd = toGroupEnd(orderedRows, sortOrder, currentRow, endIndex); int exEnd = toGroupEnd(orderedRows, sortOrder, currentRow, endIndex);
set.clear(exStart, exEnd + 1); set.clear(exStart, exEnd + 1);
...@@ -486,9 +483,6 @@ public final class WindowFrame { ...@@ -486,9 +483,6 @@ public final class WindowFrame {
set.set(currentRow); set.set(currentRow);
} }
} }
//$FALL-THROUGH$
default:
}
if (set.isEmpty()) { if (set.isEmpty()) {
return Collections.emptyIterator(); return Collections.emptyIterator();
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论