提交 683414f1 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Add some comments

上级 fcd9ac4c
......@@ -521,7 +521,7 @@ public final class WindowFrame {
int startIndex, int endIndex, boolean reverse) {
if (exclusion == WindowFrameExclusion.EXCLUDE_CURRENT_ROW) {
if (currentRow < startIndex || currentRow > endIndex) {
// Nothing to do
// Nothing to exclude
} else if (currentRow == startIndex) {
startIndex++;
} else if (currentRow == endIndex) {
......@@ -530,10 +530,13 @@ public final class WindowFrame {
return biIterator(orderedRows, startIndex, currentRow - 1, currentRow + 1, endIndex, reverse);
}
} else {
// Do not include previous rows if they are not in the range
int exStart = toGroupStart(orderedRows, sortOrder, currentRow, startIndex);
// Do not include next rows if they are not in the range
int exEnd = toGroupEnd(orderedRows, sortOrder, currentRow, endIndex);
boolean includeCurrentRow = exclusion == WindowFrameExclusion.EXCLUDE_TIES;
if (includeCurrentRow) {
// Simplify exclusion if possible
if (currentRow == exStart) {
exStart++;
includeCurrentRow = false;
......@@ -543,7 +546,7 @@ public final class WindowFrame {
}
}
if (exStart > exEnd || exEnd < startIndex || exStart > endIndex) {
// Nothing to do
// Empty range or nothing to exclude
} else if (includeCurrentRow) {
if (startIndex == exStart) {
if (endIndex == exEnd) {
......
......@@ -797,6 +797,6 @@ xym normalizes coord setz xyzm geometrycollection multipolygon mixup rings polyg
pointzm pointz pointm dimensionality redefine forum measures
mpg casted pzm mls constrained subtypes complains
ranks rno dro rko precede cume reopens preceding unbounded rightly itr lag maximal tiles tile ntile signify
partitioned
partitioned tri
discard enhancements nolock
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论