提交 4fe7e5a9 authored 作者: Stéphane Eintrazi's avatar Stéphane Eintrazi

add comment

上级 e9804dc9
......@@ -3051,6 +3051,8 @@ public class Function extends Expression implements FunctionCall {
case WEEK:
// Use Calendar to retrieve the first day of the week and convert
// the date to a dateValue
Date currentDate = DateTimeUtils.convertDateValueToDate(dateValue);
Calendar calendar = Calendar.getInstance();
calendar.setTime(currentDate);
......@@ -3061,7 +3063,7 @@ public class Function extends Expression implements FunctionCall {
break;
}
if(timeNanos == null) {
if (timeNanos == null) {
// Return an exception in the timeUnit is not recognized
throw DbException.getUnsupportedException(timeUnitStr);
......@@ -3072,8 +3074,7 @@ public class Function extends Expression implements FunctionCall {
// Case we create a timestamp with timezone with the dateValue and
// timeNanos computed.
ValueTimestampTimeZone vTmp = (ValueTimestampTimeZone) value;
result = ValueTimestampTimeZone.fromDateValueAndNanos(dateValue, timeNanos,
vTmp.getTimeZoneOffsetMins());
result = ValueTimestampTimeZone.fromDateValueAndNanos(dateValue, timeNanos, vTmp.getTimeZoneOffsetMins());
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论