github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_string_oct.result (about) 1 select oct(0b11111111); 2 oct(0b11111111) 3 377 4 select oct(12); 5 oct(12) 6 14 7 SELECT oct(1314); 8 oct(1314) 9 2442 10 select oct(2e5); 11 oct(2e5) 12 606500 13 SELECT oct(null); 14 oct(null) 15 null 16 SELECT concat_ws(",", oct(1000), oct(2000)); 17 concat_ws(",", oct(1000), oct(2000)) 18 1750,3720 19 select oct(0); 20 oct(0) 21 0 22 select oct(-1); 23 oct(-1) 24 1777777777777777777777 25 select oct(10e50); 26 internal error: the input value is out of integer range 27 select oct(-10e50); 28 internal error: the input value is out of integer range 29 select oct(0.00000000000000000000000001); 30 oct(0.00000000000000000000000001) 31 0 32 select oct(-0.00000000000000000000000001); 33 oct(-0.00000000000000000000000001) 34 0 35 select oct("你好"); 36 invalid argument cast to int, bad value 你好 37 create table t1(a int); 38 insert into t1 values(); 39 select oct(a) from t1; 40 oct(a) 41 null 42 drop table t1; 43 create table t1(a tinyint, b SMALLINT, c BIGINT, d INT, e BIGINT, f FLOAT, g DOUBLE, h decimal(38,19), i DATE, k datetime, l TIMESTAMP, m char(255), n varchar(255)); 44 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf"); 45 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf"); 46 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf"); 47 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf"); 48 select oct(a),oct(b),oct(c),oct(d),oct(e),oct(f),oct(g),oct(h),oct(i),oct(k),oct(l),oct(m),oct(n) from t1; 49 invalid argument function oct, bad value [DATE] 50 drop table t1; 51 CREATE TABLE t1(a char(255), b varchar(255)); 52 INSERT INTO t1 select oct(56), oct(234); 53 INSERT INTO t1 select oct(100), oct(234); 54 SELECT distinct oct(a), oct(b) FROM t1 ORDER BY oct(a); 55 oct(a) oct(b) 56 106 540 57 220 540 58 drop table t1; 59 CREATE TABLE t1 (a int); 60 INSERT INTO t1 VALUES (100), (12); 61 SELECT a FROM t1 62 HAVING oct(a) <>0; 63 SQL syntax error: column "t1.a" must appear in the GROUP BY clause or be used in an aggregate function 64 DROP TABLE t1; 65 drop table if exists t1; 66 create table t1(a INT, b int); 67 insert into t1 values(1, 2),(2, 3),(3, 4),(4, 5); 68 select oct(a)+oct(b) from t1 where oct(a)+oct(b)<>0; 69 oct(a) + oct(b) 70 3 71 5 72 7 73 9 74 drop table t1; 75 CREATE TABLE t1 (a int); 76 CREATE TABLE t2 (a int); 77 INSERT INTO t1 VALUES (100), (200), (300), (10); 78 INSERT INTO t2 VALUES (100), (50), (20), (10), (300); 79 SELECT t1.a, t2.a FROM t1 JOIN t2 ON (oct(t1.a) = oct(t2.a)); 80 a a 81 100 100 82 10 10 83 300 300 84 drop table t1; 85 drop table t2; 86 87 SELECT OCT(NULL) IS UNKNOWN; 88 oct(null) is unknown 89 true