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

     1  select split_part('axbxc','x',1);
     2  split_part(axbxc, x, 1)
     3  a
     4  select split_part('axbxcxd','x',2);
     5  split_part(axbxcxd, x, 2)
     6  b
     7  select split_part('axbxcxd','x',3);
     8  split_part(axbxcxd, x, 3)
     9  c
    10  select split_part('axbxcxd','xc',1);
    11  split_part(axbxcxd, xc, 1)
    12  axb
    13  select split_part('axbxcxd','xc',2);
    14  split_part(axbxcxd, xc, 2)
    15  xd
    16  select split_part('axbxcxd','xc',3);
    17  split_part(axbxcxd, xc, 3)
    18  null
    19  select split_part('axbxcxd','asas',1);
    20  split_part(axbxcxd, asas, 1)
    21  axbxcxd
    22  select split_part('axbxcxd','asas',2);
    23  split_part(axbxcxd, asas, 2)
    24  null
    25  select split_part(null,'asas',3);
    26  split_part(null, asas, 3)
    27  null
    28  select split_part('axbxcxd',null,3);
    29  split_part(axbxcxd, null, 3)
    30  null
    31  select split_part('axbxcxd','asas',null);
    32  split_part(axbxcxd, asas, null)
    33  null
    34  select split_part('axxx','x',1);
    35  split_part(axxx, x, 1)
    36  a
    37  select split_part('axxx','x',2);
    38  split_part(axxx, x, 2)
    39  
    40  select split_part('axxx','x',0);
    41  invalid input: split_part: field contains non-positive integer
    42  select split_part('axxx','x',-1);
    43  Data truncation: data out of range: data type uint32, value '-1'
    44  create table t1(a varchar,b varchar,c int);
    45  insert into t1 values('axbxc','x',1),('axbxcxd','x',2),('axbxcxd','x',3),('axbxcxd','xc',1),('axbxcxd','xc',2),('axbxcxd','xc',3),('axbxcxd','asas',1),('axbxcxd','asas',2),(null,'asas',3),('axbxcxd',null,3),('axbxcxd','asas',null),('axxx','x',1),('axxx','x',2);
    46  select split_part(a,b,c) from t1;
    47  split_part(a, b, c)
    48  a
    49  b
    50  c
    51  axb
    52  xd
    53  null
    54  axbxcxd
    55  null
    56  null
    57  null
    58  null
    59  a
    60  
    61  insert into t1 values('axxx','x',0);
    62  select split_part(a,b,c) from t1;
    63  invalid input: split_part: field contains non-positive integer
    64  insert into t1 values('axxx','x',-1);
    65  select split_part(a,b,c) from t1;
    66  Data truncation: data out of range: data type uint, value '-1'