提交 9b0bd1b3 authored 作者: Thomas Mueller's avatar Thomas Mueller

Support for the function LN (an alias for LOG).

上级 a2dd790a
......@@ -2534,7 +2534,7 @@ MOD(A, B)
See also Java ""Math.ceil"".
This method returns a double.
","
LOG(A)
CEIL(A)
"
"Functions (Numeric)","DEGREES","
......@@ -2565,7 +2565,7 @@ FLOOR(A)
"
"Functions (Numeric)","LOG","
LOG(double)
{ LOG | LN } (double)
","
See also Java ""Math.log"".
This method returns a double.
......
......@@ -17,7 +17,8 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>Support for the function CEIL (an alias for CEILING).
<ul><li>Support for the function LN (an alias for LOG).
</li><li>Support for the function CEIL (an alias for CEILING).
</li><li>Issue 315: Access to LOBs could cause a Java level deadlock.
</li><li>Support for the ICU4J collator.
</li><li>Improved Oracle compatibility: support for NVL2. Thanks to litailang for the patch!
......
......@@ -534,6 +534,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Column compression option - see http://groups.google.com/group/h2-database/browse_thread/thread/3e223504e52671fa/243da82244343f5d
</li><li>PostgreSQL compatibility: ALTER TABLE ADD combined with adding a foreign key constraint, as in ALTER TABLE FOO ADD COLUMN PARENT BIGINT REFERENCES FOO(ID).
</li><li>MS SQL Server compatibility: support @@ROWCOUNT.
</li><li>PostgreSQL compatibility: LOG(x) is LOG10(x) and not LN(x).
</li></ul>
<h2>Not Planned</h2>
......
......@@ -172,6 +172,7 @@ public class Function extends Expression implements FunctionCall {
addFunction("EXP", EXP, 1, Value.DOUBLE);
addFunction("FLOOR", FLOOR, 1, Value.DOUBLE);
addFunction("LOG", LOG, 1, Value.DOUBLE);
addFunction("LN", LOG, 1, Value.DOUBLE);
addFunction("LOG10", LOG10, 1, Value.DOUBLE);
addFunction("MOD", MOD, 2, Value.LONG);
addFunction("PI", PI, 0, Value.DOUBLE);
......
......@@ -8946,7 +8946,7 @@ select floor(null) vn, floor(1) v1, floor(1.1) v2, floor(-1.1) v3, floor(1.9) v4
> null 1.0 1.0 -2.0 1.0 -2.0
> rows: 1
select log(null) vn, log(1) v1, log(1.1) v2, log(-1.1) v3, log(1.9) v4, log(-1.9) v5 from test;
select log(null) vn, log(1) v1, ln(1.1) v2, log(-1.1) v3, log(1.9) v4, log(-1.9) v5 from test;
> VN V1 V2 V3 V4 V5
> ---- --- ------------------- --- ------------------ ---
> null 0.0 0.09531017980432493 NaN 0.6418538861723947 NaN
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论