Add license header for md files and fix some translation's error (#2137)

This commit is contained in:
xy720
2019-11-06 21:35:07 +08:00
committed by Mingyu Chen
parent 7b4ae7df06
commit 6759e83a07
439 changed files with 8723 additions and 329 deletions

View File

@ -1,8 +1,27 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# ASCII
## Description
### Syntax
'INT AXES (WARCHAR STR)'
`INT AXES (WARCHAR STR)`
Returns the ASCII code corresponding to the first character of the string
@ -10,16 +29,16 @@ Returns the ASCII code corresponding to the first character of the string
## example
```
mysql > select ascii ('1');
mysql> select ascii('1');
+------------+
124; ASCII ('1') 124;
| ascii('1') |
+------------+
| 49 |
+------------+
mysql > select axes ('234');
mysql> select ascii('234');
+--------------+
124; ASCII ('234') 124;
| ascii('234') |
+--------------+
| 50 |
+--------------+

View File

@ -1,8 +1,27 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# concat
## Description
### Syntax
'VARCHAR concat (VARCHAR,...)'
`VARCHAR concat (VARCHAR,...)`
Connect multiple strings and return NULL if any of the parameters is NULL
@ -12,23 +31,23 @@ Connect multiple strings and return NULL if any of the parameters is NULL
```
mysql> select concat("a", "b");
+------------------+
*124concat ('a','b') 1244;
| concat('a', 'b') |
+------------------+
1.2.2.2.2.2.
| ab |
+------------------+
mysql> select concat("a", "b", "c");
+-----------------------+
124concat ('a','b','c') 1244;
| concat('a', 'b', 'c') |
+-----------------------+
1.2.2.2.2.2.2.
| abc |
+-----------------------+
mysql > select concat ("a", null, "c");
mysql> select concat("a", null, "c");
+------------------------+
124concat (a), NULL,'c')
| concat('a', NULL, 'c') |
+------------------------+
No. No. No.
| NULL |
+------------------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Concat_ws
## Description
### Syntax
@ -14,23 +33,23 @@ If the separator is NULL, return NULL.
```
mysql> select concat_ws("or", "d", "is");
+----------------------------+
124concat ws (or','d','is') 124s;
| concat_ws('or', 'd', 'is') |
+----------------------------+
1.2.2.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.
| doris |
+----------------------------+
mysql> select concat_ws(NULL, "d", "is");
+----------------------------+
(NULL,'d','is') 1244;
| concat_ws(NULL, 'd', 'is') |
+----------------------------+
No. No. No.
| NULL |
+----------------------------+
mysql > select concat ws ("or", "d", NULL,"is");
mysql> select concat_ws("or", "d", NULL,"is");
+---------------------------------+
Concat ws ("or", "d", NULL,"is").
| concat_ws("or", "d", NULL,"is") |
+---------------------------------+
1.2.2.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.
| doris |
+---------------------------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# find_in_set
## description
### Syntax
@ -12,12 +31,12 @@ Return to the location where the str first appears in strlist (counting from 1).
## example
```
mysql > select find in u set ("b", "a,b,c");
mysql> select find_in_set("b", "a,b,c");
+---------------------------+
Find in set ('b','a,b,c') 1244;
| find_in_set('b', 'a,b,c') |
+---------------------------+
| 2 |
+---------------------------+
```
##keyword
FIND IN SET,FIND,IN,SET
FIND_IN_SET,FIND,IN,SET

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# get_json_double
## description
### Syntax
@ -16,9 +35,9 @@ If the json_string format is incorrect, or the json_path format is incorrect, or
1. Get the value of key as "k1"
```
mysql > SELECT get'u json 'double ('{"k1":1.3, "k2":"2"}, "$.k1");
mysql> SELECT get_json_double('{"k1":1.3, "k2":"2"}', "$.k1");
+-------------------------------------------------+
Get double ('{"k1":1.3, "k2":"2"},'$.k1')'124get;
| get_json_double('{"k1":1.3, "k2":"2"}', '$.k1') |
+-------------------------------------------------+
| 1.3 |
+-------------------------------------------------+
@ -27,9 +46,9 @@ Get double ('{"k1":1.3, "k2":"2"},'$.k1')'124get;
2. Get the second element of the array whose key is "my. key"
```
mysql > SELECT get'u json 'double ('{"k1":"v1", "my.key":[1.1, 2.2, 3.3]}','$"my.key"[1]);
mysql> SELECT get_json_double('{"k1":"v1", "my.key":[1.1, 2.2, 3.3]}', '$."my.key"[1]');
+---------------------------------------------------------------------------+
Get me a double ('{"k1":"v1", "my.key":[1.1, 2.2, 3.3]}','$"my.key"[1]])'124;
| get_json_double('{"k1":"v1", "my.key":[1.1, 2.2, 3.3]}', '$."my.key"[1]') |
+---------------------------------------------------------------------------+
| 2.2 |
+---------------------------------------------------------------------------+
@ -37,9 +56,9 @@ Get me a double ('{"k1":"v1", "my.key":[1.1, 2.2, 3.3]}','$"my.key"[1]])'124;
3. Get the first element in an array whose secondary path is k1. key - > K2
```
mysql > SELECT get'u json 'double ('{"k1.key":{"k2":[1.1, 2.2]}}','$."k1.key".k2 [0]);
mysql> SELECT get_json_double('{"k1.key":{"k2":[1.1, 2.2]}}', '$."k1.key".k2[0]');
+---------------------------------------------------------------------+
Get double ('{"k1.key":{"k2":[1.1, 2.2]}}','$"k1.key.k2 [0]])'124;
| get_json_double('{"k1.key":{"k2":[1.1, 2.2]}}', '$."k1.key".k2[0]') |
+---------------------------------------------------------------------+
| 1.1 |
+---------------------------------------------------------------------+

View File

@ -1,8 +1,27 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# get_json_int
## Description
### Syntax
'I don't get you int (VARCHAR is on, VARCHAR is on the path)
`INT get_json_int(VARCHAR json_str, VARCHAR json_path)
Parse and retrieve the integer content of the specified path in the JSON string.
@ -16,9 +35,9 @@ If the json_string format is incorrect, or the json_path format is incorrect, or
1. Get the value of key as "k1"
```
mysql > SELECT get json u int ('{"k1":1, "k2":"2"}, "$.k1");
mysql> SELECT get_json_int('{"k1":1, "k2":"2"}', "$.k1");
+--------------------------------------------+
Get it on int ('{"k1":1, "k2":"2"},'$.k1') 124s;
| get_json_int('{"k1":1, "k2":"2"}', '$.k1') |
+--------------------------------------------+
| 1 |
+--------------------------------------------+
@ -27,9 +46,9 @@ Get it on int ('{"k1":1, "k2":"2"},'$.k1') 124s;
2. Get the second element of the array whose key is "my. key"
```
mysql > SELECT get u json u int ('{"k1":"v1", "my.key":[1, 2, 3]}','$"my.key"[1]);
mysql> SELECT get_json_int('{"k1":"v1", "my.key":[1, 2, 3]}', '$."my.key"[1]');
+------------------------------------------------------------------+
Get me on int ('{"k1":"v1", "my.key":[1, 2, 3]}','$"my.key"[1]])'124;
| get_json_int('{"k1":"v1", "my.key":[1, 2, 3]}', '$."my.key"[1]') |
+------------------------------------------------------------------+
| 2 |
+------------------------------------------------------------------+
@ -37,9 +56,9 @@ Get me on int ('{"k1":"v1", "my.key":[1, 2, 3]}','$"my.key"[1]])'124;
3. Get the first element in an array whose secondary path is k1. key - > K2
```
mysql > SELECT get u json u int ('{"k1.key":{"k2":[1, 2]}','$"k1.key".k2 [0]');
mysql> SELECT get_json_int('{"k1.key":{"k2":[1, 2]}}', '$."k1.key".k2[0]');
+--------------------------------------------------------------+
Get me on int ('{"k1.key":{"k2":[1, 2]}','$"k1.key".k2 [0]) 1244;
| get_json_int('{"k1.key":{"k2":[1, 2]}}', '$."k1.key".k2[0]') |
+--------------------------------------------------------------+
| 1 |
+--------------------------------------------------------------+

View File

@ -1,8 +1,27 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# get_json_string
## description
### Syntax
'VARCHAR get'u string (VARCHAR json str, VARCHAR json path)
'VARCHAR get_json_string (VARCHAR json str, VARCHAR json path)
Parse and retrieve the string content of the specified path in the JSON string.
@ -16,42 +35,42 @@ If the json_string format is incorrect, or the json_path format is incorrect, or
1. Get the value of key as "k1"
```
mysql > SELECT get a json string ('{"k1":"v1", "k2":"v2"}, "$.k1");
mysql> SELECT get_json_string('{"k1":"v1", "k2":"v2"}', "$.k1");
+---------------------------------------------------+
Get json string ('{"k1":"v1", "k2":"v2"}','$.k1')'124get;
| get_json_string('{"k1":"v1", "k2":"v2"}', '$.k1') |
+---------------------------------------------------+
1.2.2.1.;
| v1 |
+---------------------------------------------------+
```
2. Get the second element of the array whose key is "my. key"
```
mysql > SELECT get u json string ('{"k1":"v1", "my.key":["e1", "e2", "e3"]}','$."my.key"[1]);
mysql> SELECT get_json_string('{"k1":"v1", "my.key":["e1", "e2", "e3"]}', '$."my.key"[1]');
+------------------------------------------------------------------------------+
Get json string ('{"k1":"v1", "my.key":["e1", "e2", "e3"]}','$"my.key"[1]])'1244;
| get_json_string('{"k1":"v1", "my.key":["e1", "e2", "e3"]}', '$."my.key"[1]') |
+------------------------------------------------------------------------------+
1.2.2.;2.;
| e2 |
+------------------------------------------------------------------------------+
```
3. Get the first element in an array whose secondary path is k1. key - > K2
```
mysql > SELECT get u json string ('{"k1.key":{"k2":["v1", "v2"]}}','$."k1.key".k2 [0]);
mysql> SELECT get_json_string('{"k1.key":{"k2":["v1", "v2"]}}', '$."k1.key".k2[0]');
+-----------------------------------------------------------------------+
Get json string ('{"k1.key":{"k2":["v1", "v2"]}','$"k1.key.k2 [0]])'124s;
| get_json_string('{"k1.key":{"k2":["v1", "v2"]}}', '$."k1.key".k2[0]') |
+-----------------------------------------------------------------------+
1.2.2.1.;
| v1 |
+-----------------------------------------------------------------------+
```
4. Get all the values in the array where the key is "k1"
```
mysql > SELECT get u json string ('["k1":"v1"}, {"k2":"v2"}, {"k1":"v3"}, {"k1":"v4"}],'$.k1');
mysql> SELECT get_json_string('[{"k1":"v1"}, {"k2":"v2"}, {"k1":"v3"}, {"k1":"v4"}]', '$.k1');
+---------------------------------------------------------------------------------+
Get your string ('[{"k1":"v1"}, {"k2":"v2"}, {"k1":"v3"}, {"k1":"v3"}, {"k1":"v4"}]],'$.k1') 1244;
| get_json_string('[{"k1":"v1"}, {"k2":"v2"}, {"k1":"v3"}, {"k1":"v4"}]', '$.k1') |
+---------------------------------------------------------------------------------+
124; ["v1","v3","v4"].124
| ["v1","v3","v4"] |
+---------------------------------------------------------------------------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# group_concat
## description
### Syntax
@ -14,16 +33,16 @@ mysql> select value from test;
+-------+
| value |
+-------+
(a)'124;
(b)'1244;
(c)'1244;
| a |
| b |
| c |
+-------+
mysql> select group_concat(value) from test;
+-----------------------+
| group_concat(`value`) |
+-----------------------+
124a, b, c, 124a;
| a, b, c |
+-----------------------+
mysql> select group_concat(value, " ") from test;

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# instr
## Description
### Syntax
@ -12,14 +31,14 @@ Returns the location where substr first appeared in str (counting from 1). If su
```
mysql> select instr("abc", "b");
+-------------------+
124Insr ('abc','b') 124
| instr('abc', 'b') |
+-------------------+
| 2 |
+-------------------+
mysql> select instr("abc", "d");
+-------------------+
124Insr ('abc','d') 124
| instr('abc', 'd') |
+-------------------+
| 0 |
+-------------------+

View File

@ -1,11 +1,30 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# lcase
## Description
### Syntax
'INT lcase (VARCHAR str)'
`INT lcase (VARCHAR str)`
Consistent with `lower'.
Consistent with `lower`.
##keyword
LCASE

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# left
## Description
### Syntax
@ -12,7 +31,7 @@ It returns the left part of a string of specified length
```
mysql> select left("Hello doris",5);
+------------------------+
left ('Hello doris', 5)'1244;
| left('Hello doris', 5) |
+------------------------+
| Hello |
+------------------------+

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# length
## Description
### Syntax
@ -12,7 +31,7 @@ Returns the length of the string and the number of characters returned for multi
```
mysql> select length("abc");
+---------------+
length ('abc') 1244;
| length('abc') |
+---------------+
| 3 |
+---------------+

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# locate
## Description
### Syntax
@ -24,9 +43,9 @@ mysql> SELECT LOCATE('xbar', 'foobar');
| 0 |
+--------------------------+
mysql > SELECT LOCATE ('bar','foobarbar', 5);
mysql> SELECT LOCATE('bar', 'foobarbar', 5);
+-------------------------------+
Location ('bar','foobarbar', 5)'124s;
| locate('bar', 'foobarbar', 5) |
+-------------------------------+
| 7 |
+-------------------------------+

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# lower
## Description
### Syntax
@ -12,9 +31,9 @@ Convert all strings in parameters to lowercase
```
mysql> SELECT lower("AbC123");
+-----------------+
1.A/AC.109/2002/L.1;
| lower('AbC123') |
+-----------------+
1244; abc123
| abc123 |
+-----------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# lpad
## Description
### Syntax
@ -10,18 +29,18 @@ Returns a string of length len in str, starting with the initials. If len is lon
## example
```
mysql > SELECT lpad ("hi", 5, "xy");
mysql> SELECT lpad("hi", 5, "xy");
+---------------------+
1244; lpad ('hi', 5,'xy') 1244;
| lpad('hi', 5, 'xy') |
+---------------------+
| xyxhi |
+---------------------+
mysql > SELECT lpad ("hi", 1, "xy");
mysql> SELECT lpad("hi", 1, "xy");
+---------------------+
1244; lpad ('hi', 1,'xy') 1244;
| lpad('hi', 1, 'xy') |
+---------------------+
1.2.2.2.2.2.1.1.1.1.2.
| h |
+---------------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# ltrim
## Description
### Syntax
@ -10,11 +29,11 @@ Remove the space that appears continuously from the beginning of the parameter s
## example
```
mysql > SELECT ltrim (ab d');
mysql> SELECT ltrim(' ab d');
+------------------+
1244; ltrim (ab d') 1244;
| ltrim(' ab d') |
+------------------+
1.2.4.;b d
| ab d |
+------------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# money_format
## Description
### Syntax

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# regexp_extract
## Description
### Syntax
@ -12,16 +31,16 @@ The string STR is matched regularly and the POS matching part which conforms to
```
mysql> SELECT regexp_extract('AbCdE', '([[:lower:]]+)C([[:lower:]]+)', 1);
+-------------------------------------------------------------+
.124; regexp Extract ('AbCdE', [[[[[:lower:]]]+)C ([[[:lower:]+]]]]'-1'-124;
| regexp_extract('AbCdE', '([[:lower:]]+)C([[:lower:]]+)', 1) |
+-------------------------------------------------------------+
(b)'1244;
| b |
+-------------------------------------------------------------+
mysql> SELECT regexp_extract('AbCdE', '([[:lower:]]+)C([[:lower:]]+)', 2);
+-------------------------------------------------------------+
.124; regexp Extract ('AbCdE', [[[[[:lower:]]]+)C ([[[:lower:]+]]]]]'-2'-124;
| regexp_extract('AbCdE', '([[:lower:]]+)C([[:lower:]]+)', 2) |
+-------------------------------------------------------------+
(d) 124d;
| d |
+-------------------------------------------------------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# regexp_replace
## description
### Syntax
@ -14,14 +33,14 @@ mysql> SELECT regexp_replace('a b c', " ", "-");
+-----------------------------------+
| regexp_replace('a b c', ' ', '-') |
+-----------------------------------+
A -b -c `124;
| a-b-c |
+-----------------------------------+
mysql> SELECT regexp_replace('a b c','(b)','<\\1>');
+----------------------------------------+
Replace ('a b c','(b)','<\1 >') regexp;
| regexp_replace('a b c', '(b)', '<\1>') |
+----------------------------------------+
A <b >c {1244}
| a <b> c |
+----------------------------------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# repeat
## Description
### Syntax
@ -12,14 +31,14 @@ Repeat the str of the string count times, return empty string when count is less
```
mysql> SELECT repeat("a", 3);
+----------------+
repeat ('a', 3)'1244;
| repeat('a', 3) |
+----------------+
| aaa |
+----------------+
mysql> SELECT repeat("a", -1);
+-----------------+
repeat ('a', -1) 1244;
| repeat('a', -1) |
+-----------------+
| |
+-----------------+

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# right
## Description
### Syntax
@ -12,9 +31,9 @@ It returns the right part of a string of specified length
```
mysql> select right("Hello doris",5);
+-------------------------+
Right ('Hello doris', 5)'1244;
| right('Hello doris', 5) |
+-------------------------+
1.2.2.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.
| doris |
+-------------------------+
```
##keyword

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# split_part
## Description
### Syntax
@ -12,7 +31,7 @@ Returns the specified partition (counting from the beginning) by splitting the s
```
mysql> select split_part("hello world", " ", 1);
+----------------------------------+
(hello world','1)'124split part';
| split_part('hello world', ' ', 1) |
+----------------------------------+
| hello |
+----------------------------------+
@ -20,21 +39,21 @@ mysql> select split_part("hello world", " ", 1);
mysql> select split_part("hello world", " ", 2);
+----------------------------------+
(hello world','2)'124u;
| split_part('hello world', ' ', 2) |
+----------------------------------+
| world |
+----------------------------------+
mysql> select split_part("2019年7月8号", "月", 1);
+-----------------------------------------+
(2019726376;821495;','263761,') 1244;
| split_part('2019年7月8号', '月', 1) |
+-----------------------------------------+
| July 2019|
| 2019年7 |
+-----------------------------------------+
mysql> select split_part("abca", "a", 1);
+----------------------------+
split part ('abca','a', 1)
| split_part('abca', 'a', 1) |
+----------------------------+
| |
+----------------------------+

View File

@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# strleft
## Description
### Syntax
@ -12,7 +31,7 @@ It returns the left part of a string of specified length
```
mysql> select strleft("Hello doris",5);
+------------------------+
(Hello doris', 5)'1244;
| strleft('Hello doris', 5) |
+------------------------+
| Hello |
+------------------------+

View File

@ -1,3 +1,23 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# strright
## Description
### Syntax
@ -12,9 +32,9 @@ It returns the right part of a string of specified length
```
mysql> select strright("Hello doris",5);
+-------------------------+
strright ('Hello doris', 5)'1244;
| strright('Hello doris', 5) |
+-------------------------+
1.2.2.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.
| doris |
+-------------------------+
```
##keyword