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

     1  drop table if exists t1;
     2  create table t1(a int,b varchar(100),c char(20));
     3  insert into t1 values
     4  (1,'Ananya Majumdar', 'IX'),
     5  (2,'Anushka Samanta', 'X'),
     6  (3,'Aniket Sharma', 'XI'),
     7  (4,'Anik Das', 'X'),
     8  (5,'Riya Jain', 'IX'),
     9  (6,'Tapan Samanta', 'X');
    10  select a,startswith(b,'An') from t1;
    11  a    startswith(b, An)
    12  1    true
    13  2    true
    14  3    true
    15  4    true
    16  5    false
    17  6    false
    18  select a,b,c from t1 where startswith(b,'An')=1 and startswith(c,'I')=1;
    19  a    b    c
    20  1    Ananya Majumdar    IX
    21  drop table t1;
    22  drop table if exists t1;
    23  create table t1(a int,b varchar(100),c char(20));
    24  insert into t1 values
    25  (1,'Ananya Majumdar', 'XI'),
    26  (2,'Anushka Samanta', 'X'),
    27  (3,'Aniket Sharma', 'XI'),
    28  (4,'Anik Das', 'X'),
    29  (5,'Riya Jain', 'IX'),
    30  (6,'Tapan Samanta', 'XI');
    31  select a,endsWith(b,'a') from t1;
    32  a    endswith(b, a)
    33  1    false
    34  2    true
    35  3    true
    36  4    false
    37  5    false
    38  6    true
    39  select a,b,c from t1 where endswith(b,'a')=1 and endswith(c,'I')=1;
    40  a    b    c
    41  3    Aniket Sharma    XI
    42  6    Tapan Samanta    XI
    43  drop table t1;
    44  drop table if exists t1;
    45  create table t1(a varchar(255),b char(255));
    46  insert into t1 values(NULL, NULL);
    47  insert into t1 values('a',null);
    48  insert into t1 values(null, 'b');
    49  select startswith(a,b) from t1;
    50  startswith(a, b)
    51  null
    52  null
    53  null
    54  drop table t1;
    55  drop table if exists t1;
    56  create table t1(a varchar(255),b char(255));
    57  insert into t1 values(NULL, NULL);
    58  insert into t1 values('a',null);
    59  insert into t1 values(null, 'b');
    60  select endsWith(a,b) from t1;
    61  endswith(a, b)
    62  null
    63  null
    64  null
    65  drop table t1;
    66  select endsWith('a', 'a') from dual;
    67  endswith(a, a)
    68  true
    69  select endsWith('a', 'b') from dual;
    70  endswith(a, b)
    71  false
    72  select endsWith('aaaa', 'a') from dual;
    73  endswith(aaaa, a)
    74  true
    75  select endsWith('xsdfsdf', 'fsdf') from dual;
    76  endswith(xsdfsdf, fsdf)
    77  true
    78  select endsWith('xsdfsdf', 'fsdfx') from dual;
    79  endswith(xsdfsdf, fsdfx)
    80  false