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

Issue 329: CASE expression: data type problem is not detected.

上级 605302a9
......@@ -1698,13 +1698,16 @@ public class Function extends Expression implements FunctionCall {
p = 0;
d = 0;
for (Expression e : args) {
if (e != ValueExpression.getNull() && e.getType() != Value.UNKNOWN) {
t = Value.getHigherOrder(t, e.getType());
if (e != ValueExpression.getNull()) {
int type = e.getType();
if (type != Value.UNKNOWN && type != Value.NULL) {
t = Value.getHigherOrder(t, type);
s = Math.max(s, e.getScale());
p = Math.max(p, e.getPrecision());
d = Math.max(d, e.getDisplaySize());
}
}
}
if (t == Value.UNKNOWN) {
t = Value.STRING;
s = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论