提交 956cbe18 authored 作者: Thomas Mueller's avatar Thomas Mueller

CAST(x AS VARCHAR_IGNORECASE(y) / CHAR(y)) returned a VARCHAR if the new…

CAST(x AS VARCHAR_IGNORECASE(y) / CHAR(y)) returned a VARCHAR if the new precision was lower than the old precision.
上级 2eb31e32
......@@ -53,8 +53,8 @@ public class ValueStringFixed extends ValueString {
return (ValueStringFixed) Value.cache(obj);
}
protected Value getNew(String s) {
return ValueString.get(s);
protected ValueString getNew(String s) {
return ValueStringFixed.get(s);
}
}
......@@ -70,8 +70,8 @@ public class ValueStringIgnoreCase extends ValueString {
return obj;
}
protected Value getNew(String s) {
return ValueString.get(s);
protected ValueString getNew(String s) {
return ValueStringIgnoreCase.get(s);
}
}
--- special grammar and test cases ---------------------------------------------------------------------------------------------
select * from dual where cast('xx' as varchar_ignorecase(1)) = 'X' and cast('x x ' as char(2)) = 'x';
> X
> -
> 1
> rows: 1
explain select -cast(0 as real), -cast(0 as double);
> PLAN
> --------------------------------------------------------------------------------------------
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论