github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/function/func_math_floor.result (about)

     1  select floor(5.5),floor(-5.5);
     2  floor(5.5)	floor(-5.5)
     3  5	-6
     4  select floor(1.1e5);
     5  floor(1.1e5)
     6  110000.0
     7  select floor(cast(-2 as unsigned)), floor(18446744073709551614), floor(-2);
     8  Data truncation: data out of range: data type uint64, 
     9  SELECT floor(ceil(12345678901234567890));
    10  floor(ceil(12345678901234567890))
    11  12345678901234567890
    12  SELECT floor(18446744073709551616);
    13  floor(18446744073709551616)
    14  18446744073709551616
    15  SELECT floor(floor(18446744073709551616));
    16  floor(floor(18446744073709551616))
    17  18446744073709551616
    18  SELECT floor(floor(floor(18446744073709551616)));
    19  floor(floor(floor(18446744073709551616)))
    20  18446744073709551616
    21  CREATE TABLE t1(a BIGINT UNSIGNED);
    22  INSERT INTO t1 VALUES(18446744073709551615);
    23  SELECT CEILING(a) AS c, FLOOR(a) AS f FROM t1;
    24  c	f
    25  18446744073709551615	18446744073709551615
    26  DROP TABLE t1;
    27  select floor(999999999999999999);
    28  floor(999999999999999999)
    29  999999999999999999
    30  select floor(9999999999999999999999);
    31  floor(9999999999999999999999)
    32  9999999999999999999999
    33  select floor(9.999999999999999999999);
    34  floor(9.999999999999999999999)
    35  9
    36  select floor(-9.999999999999999999999);
    37  floor(-9.999999999999999999999)
    38  -10
    39  select floor(-999999999999999999999.999);
    40  floor(-999999999999999999999.999)
    41  -1000000000000000000000
    42  CREATE TABLE t1 (col1 INTEGER);
    43  CREATE TABLE t2 (col1 INTEGER);
    44  INSERT INTO t1 VALUES (1), (2);
    45  INSERT INTO t2 VALUES (1), (2);
    46  SELECT
    47  t1.col1,
    48  t2.col1
    49  FROM
    50  t1,
    51  t2
    52  WHERE
    53  t1.col1 = t2.col1
    54  AND t1.col1 = FLOOR(2);
    55  col1	col1
    56  2	2
    57  drop table t1;
    58  drop table t2;
    59  CREATE TABLE t1 (a VARCHAR(250), b INT, PRIMARY KEY (b));
    60  insert into t1 (a) select (FLOOR(0.13 * 100));
    61  invalid input: invalid default value
    62  insert into t1 (a) select FLOOR(1.32 * 100) from t1;
    63  invalid input: invalid default value
    64  insert into t1 (a) select FLOOR(0.0044 * 100) from t1;
    65  invalid input: invalid default value
    66  insert into t1 (a) select FLOOR(124.314 * 100) from t1;
    67  invalid input: invalid default value
    68  insert into t1 (a) select FLOOR(0.3414 * 100) from t1;
    69  invalid input: invalid default value
    70  insert into t1 (a) select FLOOR(12.4412 * 100) from t1;
    71  invalid input: invalid default value
    72  insert into t1 (a) select FLOOR(124131.4123 * 100) from t1;
    73  invalid input: invalid default value
    74  insert into t1 (a) select FLOOR(0.2314114 * 100) from t1;
    75  invalid input: invalid default value
    76  insert into t1 (a) select FLOOR(13.45123 * 100) from t1;
    77  invalid input: invalid default value
    78  insert into t1 (a) select FLOOR(0.44521 * 100) from t1;
    79  invalid input: invalid default value
    80  insert into t1 (a) select FLOOR(0.577134 * 100) from t1;
    81  invalid input: invalid default value
    82  insert into t1 (a) select FLOOR(1244.53 * 100) from t1;
    83  invalid input: invalid default value
    84  insert into t1 (a) select FLOOR(6604.642222 * 100) from t1;
    85  invalid input: invalid default value
    86  insert into t1 (a) select FLOOR(1415.313 * 100) from t1;
    87  invalid input: invalid default value
    88  SELECT a,
    89  (SELECT space(250) FROM t1 i1
    90  WHERE i1.b=t1.a ORDER BY 1 LIMIT 1) AS a
    91  FROM t1 ORDER BY a LIMIT 5;
    92  a	a
    93  DROP TABLE t1;
    94  SELECT DATE(FLOOR(20110512154559.616));
    95  invalid argument operator cast, bad value [DECIMAL128 DATE]
    96  CREATE table t1(a int, b float);
    97  insert into t1 select floor(12124.413), floor(-4213.413);
    98  insert into t1 select floor(12124.123), floor(-42413.409);
    99  select distinct floor(a) from t1;
   100  floor(a)
   101  12124
   102  drop table t1;
   103  select floor(null);
   104  floor(null)
   105  null
   106  select floor(123.34)-floor(123.03);
   107  floor(123.34)-floor(123.03)
   108  0
   109  drop table if exists t1;
   110  create table t1(a INT,  b float);
   111  insert into t1 select floor(12124.413), floor(-4213.413);
   112  insert into t1 select floor(12124.123), floor(-42413.409);
   113  select * from t1 where floor(a)=12124;
   114  a	b
   115  12124	-4214.0
   116  12124	-42414.0
   117  drop table t1;
   118  create table t1(a INT,  b float);
   119  create table t2(a INT,  b float);
   120  insert into t1 select floor(12124.413), floor(-4213.413);
   121  insert into t1 select floor(12124.123), floor(-42413.409);
   122  insert into t2 select floor(14124.413), floor(-4213.413);
   123  insert into t2 select floor(984798.123), floor(-980.409);
   124  SELECT t1.a, t2.a FROM t1 JOIN t2 ON (floor(t1.b) = floor(t2.b));
   125  a	a
   126  12124	14124
   127  drop table t1;
   128  drop table t2;
   129  drop table if exists t1;
   130  create table t1(a INT,  b float);
   131  insert into t1 select floor(14124.413), floor(-4213.413);
   132  insert into t1 select floor(984798.123), floor(-980.409);
   133  select b from t1 group by b having floor(b)<-1000;
   134  b
   135  -4214.0
   136  drop table t1;
   137  select floor(123.342, 1);
   138  floor(123.342, 1)
   139  123.3000
   140  select floor(123.45, -1);
   141  floor(123.45, -1)
   142  120.0000
   143  select floor(123.342124124214, 100);
   144  floor(123.342124124214, 100)
   145  123.342124124214
   146  select floor(-123.342124124214, -100);
   147  floor(-123.342124124214, -100)
   148  -1.0E100
   149  select floor(123.342, null);
   150  invalid argument the second argument of the floor, bad value not const
   151  select floor(null, 1);
   152  floor(null, 1)
   153  null
   154  select floor(null, null);
   155  invalid argument the second argument of the floor, bad value not const