github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_math_ceil.result (about)

     1  select ceiling(5.5),ceiling(-5.5);
     2  ceiling(5.5)	ceiling(-5.5)
     3  6	-5
     4  select ceiling(cast(-2 as unsigned)), ceiling(18446744073709551614), ceiling(-2);
     5  Data truncation: data out of range: data type uint64, value '-2'
     6  select ceiling(1.1e5);
     7  ceiling(1.1e5)
     8  110000.0
     9  create table t(a double);
    10  insert into t select (CEILING(18446744073709551615));
    11  insert into t select (FLOOR(18446744073709551615));
    12  select * from t;
    13  a
    14  1.8446744073709552E19
    15  1.8446744073709552E19
    16  drop table t;
    17  create table t(a decimal(19,0));
    18  insert into t select (CEILING(CAST(1844674407370955161 AS DECIMAL(19, 0))));
    19  insert into t select (FLOOR(CAST(1844674407370955161 AS DECIMAL(19, 0))));
    20  SELECT * FROM t;
    21  a
    22  1844674407370955161
    23  1844674407370955161
    24  DROP TABLE t;
    25  create table t(a decimal(19,0));
    26  insert into t select (CEILING(CAST(-9223372036854775808 AS DECIMAL(19, 0))));
    27  insert into t select (FLOOR(CAST(-9223372036854775808 AS DECIMAL(19, 0))));
    28  SELECT * FROM t;
    29  a
    30  -9223372036854775808
    31  -9223372036854775808
    32  DROP TABLE t;
    33  create table t(a decimal(18,0));
    34  insert into t select (CEILING(CAST(184467440737095516 AS DECIMAL(18, 0))));
    35  insert into t select (FLOOR(CAST(184467440737095516 AS DECIMAL(18, 0))));
    36  SELECT * FROM t;
    37  a
    38  184467440737095516
    39  184467440737095516
    40  DROP TABLE t;
    41  create table t(a decimal(18,0));
    42  insert into t select (CEILING(CAST(-922337203685477580 AS DECIMAL(18, 0))));
    43  insert into t select (FLOOR(CAST(-922337203685477580 AS DECIMAL(18, 0))));
    44  SELECT * FROM t;
    45  a
    46  -922337203685477580
    47  -922337203685477580
    48  DROP TABLE t;
    49  CREATE table t1(a int, b float);
    50  insert into t1 select ceiling(12124.413), ceiling(-4213.413);
    51  insert into t1 select ceiling(12124.123), ceiling(-42413.409);
    52  select distinct ceiling(a) from t1;
    53  ceiling(a)
    54  12125
    55  drop table t1;
    56  select ceiling(null);
    57  ceiling(null)
    58  null
    59  select ceil(123.34)-ceil(123.03);
    60  ceil(123.34)-ceil(123.03)
    61  0
    62  drop table if exists t1;
    63  create table t1(a INT,  b float);
    64  insert into t1 select ceiling(12124.413), ceiling(-4213.413);
    65  insert into t1 select ceiling(12124.123), ceiling(-42413.409);
    66  select * from t1 where ceiling(a)=12125;
    67  a	b
    68  12125	-4213.0
    69  12125	-42413.0
    70  drop table t1;
    71  drop table if exists t1;
    72  drop table if exists t2;
    73  create table t1(a INT,  b float);
    74  create table t2(a INT,  b float);
    75  insert into t1 select ceiling(12124.413), ceiling(-4213.413);
    76  insert into t1 select ceiling(12124.123), ceiling(-42413.409);
    77  insert into t2 select ceiling(14124.413), ceiling(-4213.413);
    78  insert into t2 select ceiling(984798.123), ceiling(-980.409);
    79  SELECT t1.a, t2.a FROM t1 JOIN t2 ON (ceiling(t1.b) = ceiling(t2.b));
    80  a	a
    81  12125	14125
    82  drop table t1;
    83  drop table t2;
    84  drop table if exists t1;
    85  create table t1(a INT,  b float);
    86  insert into t1 select ceiling(14124.413), ceiling(-4213.413);
    87  insert into t1 select ceiling(984798.123), ceiling(-980.409);
    88  select b from t1 group by b having ceil(b)<-1000;
    89  b
    90  -4213.0
    91  drop table t1;
    92  select ceil(123.342, 1);
    93  ceil(123.342, 1)
    94  123.4000
    95  select ceil(123.45, -1);
    96  ceil(123.45, -1)
    97  130.0000
    98  select ceil(123.342124124214, 100);
    99  ceil(123.342124124214, 100)
   100  123.342124124214
   101  select ceil(-123.342124124214, -100);
   102  Data truncation: data out of range: data type decimal64, ceil(decimal64(18,12),-100)
   103  select ceil(123.342, null);
   104  invalid argument the second argument of the ceil, bad value not const
   105  select ceil(null, 1);
   106  ceil(null, 1)
   107  null
   108  select ceil(null, null);
   109  invalid argument the second argument of the ceil, bad value not const