提交 1289d67c authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Fix ValueInterval.negate()

上级 7a026e85
......@@ -296,7 +296,7 @@ public class ValueInterval extends Value {
if (leading == 0L && remaining == 0L) {
return this;
}
return from(getQualifier(), !negative, -leading, remaining);
return from(getQualifier(), !negative, leading, remaining);
}
}
......@@ -679,6 +679,9 @@ SELECT INTERVAL '1-2' YEAR TO MONTH + TIMESTAMP WITH TIME ZONE '2000-01-01 12:00
SELECT TIMESTAMP WITH TIME ZONE '2000-01-01 12:00:00+01' - INTERVAL '1-2' YEAR TO MONTH;
>> 1998-11-01 12:00:00+01
SELECT -INTERVAL '1' DAY;
>> INTERVAL '-1' DAY
-- Date-time subtraction
SELECT TIME '10:30:15.123456789' - TIME '11:00:00';
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论