Unverified 提交 d5cf5730 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov 提交者: GitHub

Merge pull request #1285 from katzyn/misc

Read nanoseconds of timestamps from old H2 versions properly and remove some dead code
......@@ -255,26 +255,10 @@ class MVSortedTempResult extends MVTempResult {
@Override
public int removeRow(Value[] values) {
assert parent == null;
ValueArray key = getKey(values);
if (distinct) {
// If an entry was removed decrement the counter
if (map.remove(key) != null) {
rowCount--;
}
} else {
Long old = map.remove(key);
if (old != null) {
long l = old;
if (l > 1) {
/*
* We have more than one such row. Decrement its counter by 1 and put this row
* back into map.
*/
map.put(key, l - 1);
}
rowCount--;
}
assert parent == null && distinct;
// If an entry was removed decrement the counter
if (map.remove(getKey(values)) != null) {
rowCount--;
}
return rowCount;
}
......
......@@ -738,7 +738,7 @@ public class Data {
case Value.TIMESTAMP: {
return ValueTimestamp.fromMillisNanos(
DateTimeUtils.getTimeUTCWithoutDst(readVarLong()),
readVarInt());
readVarInt() % 1_000_000);
}
case Value.TIMESTAMP_TZ: {
long dateValue = readVarLong();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论