提交 64e4aca4 authored 作者: Noel Grandin's avatar Noel Grandin

remove redundant code, we are already comparing a==b at the start of the

method
上级 a9d69199
......@@ -12,7 +12,6 @@ import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.Arrays;
import org.h2.api.ErrorCode;
import org.h2.message.DbException;
import org.h2.mvstore.DataUtils;
......@@ -133,20 +132,13 @@ public class ValueDataType implements DataType {
if (aNull || bNull) {
return SortOrder.compareNull(aNull, sortType);
}
int comp = compareTypeSafe(a, b);
int comp = a.compareTypeSafe(b, compareMode);
if ((sortType & SortOrder.DESCENDING) != 0) {
comp = -comp;
}
return comp;
}
private int compareTypeSafe(Value a, Value b) {
if (a == b) {
return 0;
}
return a.compareTypeSafe(b, compareMode);
}
@Override
public int getMemory(Object obj) {
if (obj instanceof SpatialKey) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论