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

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

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