提交 66f5bee1 authored 作者: Thomas Mueller's avatar Thomas Mueller

remove old TODOs

上级 465c51a1
......@@ -234,13 +234,11 @@ public class DataType {
createDecimal(Integer.MAX_VALUE, ValueDecimal.DEFAULT_PRECISION, ValueDecimal.DEFAULT_SCALE, ValueDecimal.DEFAULT_DISPLAY_SIZE, true, false),
new String[]{"DECIMAL", "DEC"},
17
// TODO value: are NaN, Inf, -Inf,... supported as well?
);
add(Value.DECIMAL, Types.NUMERIC, "BigDecimal",
createDecimal(Integer.MAX_VALUE, ValueDecimal.DEFAULT_PRECISION, ValueDecimal.DEFAULT_SCALE, ValueDecimal.DEFAULT_DISPLAY_SIZE, true, false),
new String[]{"NUMERIC", "NUMBER"},
17
// TODO value: are NaN, Inf, -Inf,... supported as well?
);
add(Value.FLOAT, Types.REAL, "Float",
createDecimal(ValueFloat.PRECISION, ValueFloat.PRECISION, 0, ValueFloat.DISPLAY_SIZE, false, false),
......@@ -256,25 +254,21 @@ public class DataType {
createDecimal(ValueDouble.PRECISION, ValueDouble.PRECISION, 0, ValueDouble.DISPLAY_SIZE, false, false),
new String[] {"FLOAT", "FLOAT8" },
4
// TODO value: show min and max values, E format if supported
);
add(Value.TIME, Types.TIME, "Time",
createDate(ValueTime.PRECISION, "TIME", 0, ValueTime.DISPLAY_SIZE),
new String[]{"TIME"},
10
// TODO value: min / max for time
);
add(Value.DATE, Types.DATE, "Date",
createDate(ValueDate.PRECISION, "DATE", 0, ValueDate.DISPLAY_SIZE),
new String[]{"DATE"},
10
// TODO value: min / max for date
);
add(Value.TIMESTAMP, Types.TIMESTAMP, "Timestamp",
createDate(ValueTimestamp.PRECISION, "TIMESTAMP", ValueTimestamp.DEFAULT_SCALE, ValueTimestamp.DISPLAY_SIZE),
new String[]{"TIMESTAMP", "DATETIME", "SMALLDATETIME"},
12
// TODO value: min / max for timestamp
);
add(Value.BYTES, Types.VARBINARY, "Bytes",
createString(false),
......
......@@ -77,7 +77,6 @@ public class ValueDecimal extends Value {
public Value divide(Value v) throws SQLException {
ValueDecimal dec = (ValueDecimal) v;
// TODO value: divide decimal: rounding?
if (dec.value.signum() == 0) {
throw Message.getSQLException(ErrorCode.DIVISION_BY_ZERO_1, getSQL());
}
......@@ -191,8 +190,6 @@ public class ValueDecimal extends Value {
} else if (DEC_ONE.equals(dec)) {
return (ValueDecimal) ONE;
}
// TODO value optimization: find a way to read size of BigDecimal,
// check max cache size
return (ValueDecimal) Value.cache(new ValueDecimal(dec));
}
......
......@@ -105,7 +105,6 @@ public class ValueDouble extends Value {
}
public int getScale() {
// TODO value: what is the scale of a double?
return 0;
}
......
......@@ -105,7 +105,6 @@ public class ValueFloat extends Value {
}
public int getScale() {
// TODO value: what is the scale of a float?
return 0;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论