提交 3321a9f9 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Check SysProperties.SORT_NULLS_HIGH in AggregateDataMedian

上级 cfde40ae
......@@ -12,6 +12,7 @@ import java.util.Comparator;
import org.h2.engine.Database;
import org.h2.engine.Session;
import org.h2.engine.SysProperties;
import org.h2.index.Cursor;
import org.h2.index.Index;
import org.h2.result.SearchRow;
......@@ -42,7 +43,8 @@ class AggregateDataMedian extends AggregateDataCollecting {
IndexColumn ic = index.getIndexColumns()[0];
int sortType = ic.sortType;
return (sortType & SortOrder.NULLS_LAST) != 0
|| (sortType & SortOrder.DESCENDING) != 0 && (sortType & SortOrder.NULLS_FIRST) == 0;
|| (sortType & SortOrder.NULLS_FIRST) == 0
&& ((sortType & SortOrder.DESCENDING) != 0 ^ SysProperties.SORT_NULLS_HIGH);
}
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论