github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_math_ln.test (about) 1 #SELECT, 嵌套 2 select log(ln(10)),ln(log(2)); 3 4 #SELECT 5 SELECT ln(2); 6 SELECT ln(-2); 7 SELECT ln(0); 8 9 10 #EXTREME VALUE, 科学计数 11 12 select ln(0.00000000000000001); 13 select ln(2e2); 14 select ln(0.141241241241313); 15 select ln(-124314124124.12412341); 16 17 18 #NULL 19 select ln(null); 20 21 #INSERT 22 CREATE TABLE t1(a DOUBLE); 23 INSERT INTO t1 select (ln(56)); 24 INSERT INTO t1 select (ln(100)); 25 SELECT * FROM t1 ORDER BY a; 26 drop table t1; 27 28 #DATATYPE 29 create table t1(a tinyint, b SMALLINT, c bigint, d INT, e BIGINT, f FLOAT, g DOUBLE, h decimal(38,19)); 30 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314); 31 select ln(a),ln(b),ln(c),ln(d),ln(e),ln(f),ln(g),ln(h) from t1; 32 drop table t1; 33 34 #算术操作 35 select ln(123.54-123.03); 36 select ln(123.54*0.34); 37 select ln(134)-ln(194); 38 39 40 #WHERE,distinct 41 drop table if exists t1; 42 create table t1(a int); 43 insert into t1 values(10), (100); 44 select distinct * from t1 where ln(a)>0; 45 drop table t1; 46 47 #ON CONDITION 48 create table t1(a INT, b int); 49 create table t2(a INT, b int); 50 insert into t1 values(2,4), (100,23); 51 insert into t2 values(10,100), (4,41); 52 SELECT t1.a, t2.a FROM t1 JOIN t2 ON (ln(t1.a) <> ln(t2.a)); 53 drop table t1; 54 drop table t2; 55 56 57 58 #HAVING,比较操作 59 drop table if exists t1; 60 create table t1(a float, b float); 61 insert into t1 values(14.413, 43.413), (8.123, 0.409); 62 select b from t1 group by b having ln(b)>0; 63 drop table t1; 64