提交 c427908d authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 64a622bf
......@@ -277,10 +277,6 @@ public class Select extends Query {
Value[] row = new Value[columnCount];
for (int i = 0; i < columnCount; i++) {
Expression expr = (Expression) expressions.get(i);
int testing;
if(expr == null) {
System.out.println("stop");
}
row[i] = expr.getValue(session);
}
result.addRow(row);
......
......@@ -682,10 +682,13 @@ public class Function extends Expression implements FunctionCall {
return ValueTimestamp.getNoCopy(dateadd(v0.getString(), v1.getInt(), v2.getTimestampNoCopy()));
case DATEDIFF:
return ValueLong.get(datediff(v0.getString(), v1.getTimestampNoCopy(), v2.getTimestampNoCopy()));
case DAYNAME:
case DAYNAME: {
Value result;
synchronized(FORMAT_DAYNAME) {
return ValueString.get(FORMAT_DAYNAME.format(v0.getDateNoCopy()));
result = ValueString.get(FORMAT_DAYNAME.format(v0.getDateNoCopy()));
}
return result;
}
case DAYOFMONTH:
return ValueInt.get(getDatePart(v0.getTimestampNoCopy(), Calendar.DAY_OF_MONTH));
case DAYOFWEEK:
......@@ -698,10 +701,13 @@ public class Function extends Expression implements FunctionCall {
return ValueInt.get(getDatePart(v0.getTimestampNoCopy(), Calendar.MINUTE));
case MONTH:
return ValueInt.get(getDatePart(v0.getTimestampNoCopy(), Calendar.MONTH));
case MONTHNAME:
case MONTHNAME: {
Value v;
synchronized(FORMAT_MONTHNAME) {
return ValueString.get(FORMAT_MONTHNAME.format(v0.getDateNoCopy()));
v = ValueString.get(FORMAT_MONTHNAME.format(v0.getDateNoCopy()));
}
return v;
}
case QUARTER:
return ValueInt.get((getDatePart(v0.getTimestamp(), Calendar.MONTH) - 1) / 3 + 1);
case SECOND:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论