提交 5b4f1933 authored 作者: Stéphane Eintrazi's avatar Stéphane Eintrazi

return timestamp when truncating a date

上级 4445ec63
......@@ -1512,11 +1512,6 @@ public class Function extends Expression implements FunctionCall {
// '10:00:00 -> 00:00:00).
result = v1.subtract(v1);
} else if (v1 instanceof ValueDate) {
// Case where we already have the date truncated to the day.
result = v1;
} else if (v1 instanceof ValueTimestampTimeZone) {
// Create a new ValueTimestampTimeZone by only setting the
......
......@@ -11,10 +11,10 @@ select DATE_TRUNC('DAY', time '15:14:13');
>> 00:00:00
select DATE_TRUNC('day', date '2015-05-29');
>> 2015-05-29
>> 2015-05-29 00:00:00
select DATE_TRUNC('DAY', date '2015-05-29');
>> 2015-05-29
>> 2015-05-29 00:00:00
select DATE_TRUNC('day', timestamp '2015-05-29 15:14:13');
>> 2015-05-29 00:00:00
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论