提交 0cd0c6ca authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting

上级 08748cc1
...@@ -1704,14 +1704,14 @@ public class Function extends Expression implements FunctionCall { ...@@ -1704,14 +1704,14 @@ public class Function extends Expression implements FunctionCall {
return ts; return ts;
} }
// We allow long for manipulating the millisecond component, // We allow long for manipulating the millisecond component,
// for the rest we only allow int. // for the rest we only allow int.
if (count > Integer.MAX_VALUE) { if (count > Integer.MAX_VALUE) {
throw DbException.getInvalidValueException("DATEADD count", count); throw DbException.getInvalidValueException("DATEADD count", count);
} }
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
int nanos = d.getNanos() % 1000000; int nanos = d.getNanos() % 1000000;
calendar.setTime(d); calendar.setTime(d);
calendar.add(field, (int)count); calendar.add(field, (int) count);
long t = calendar.getTime().getTime(); long t = calendar.getTime().getTime();
Timestamp ts = new Timestamp(t); Timestamp ts = new Timestamp(t);
ts.setNanos(ts.getNanos() + nanos); ts.setNanos(ts.getNanos() + nanos);
......
...@@ -387,10 +387,10 @@ public class IndexCondition { ...@@ -387,10 +387,10 @@ public class IndexCondition {
@Override @Override
public String toString() { public String toString() {
return "column=" + column + return "column=" + column +
", compareType=" + compareTypeToString(compareType) + ", compareType=" + compareTypeToString(compareType) +
", expression=" + expression + ", expression=" + expression +
", expressionList=" + expressionList.toString() + ", expressionList=" + expressionList.toString() +
", expressionQuery=" + expressionQuery; ", expressionQuery=" + expressionQuery;
} }
......
...@@ -131,7 +131,7 @@ public class FileStore { ...@@ -131,7 +131,7 @@ public class FileStore {
if (fileName != null) { if (fileName != null) {
FilePath p = FilePath.get(fileName); FilePath p = FilePath.get(fileName);
// if no explicit scheme was specified, NIO is used // if no explicit scheme was specified, NIO is used
if (p instanceof FilePathDisk && if (p instanceof FilePathDisk &&
!fileName.startsWith(p.getScheme() + ":")) { !fileName.startsWith(p.getScheme() + ":")) {
// ensure the NIO file system is registered // ensure the NIO file system is registered
FilePathNio.class.getName(); FilePathNio.class.getName();
......
...@@ -890,7 +890,7 @@ public class CacheLongKeyLIRS<V> { ...@@ -890,7 +890,7 @@ public class CacheLongKeyLIRS<V> {
evictBlock(); evictBlock();
} while (usedMemory > maxMemory); } while (usedMemory > maxMemory);
} }
private void evictBlock() { private void evictBlock() {
// ensure there are not too many hot entries: right shift of 5 is // ensure there are not too many hot entries: right shift of 5 is
// division by 32, that means if there are only 1/32 (3.125%) or // division by 32, that means if there are only 1/32 (3.125%) or
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论