-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string-functions: add instrunctions for LEFT() and LENGTH() #16068
string-functions: add instrunctions for LEFT() and LENGTH() #16068
Conversation
Welcome @takaidohigasi! |
750fc3e
to
dc177e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The content looks very good. I think it explains the normal case as well as common corner cases.
I think the SQL statement and output should be in separate blocks like this:
```sql
SELECT 1
```
```
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.01 sec)
```
Maybe the text for LENGTH()
should have a reference to CHAR_LENGTH()
?
mysql> SELECT LENGTH('Café');
+-----------------+
| LENGTH('Café') |
+-----------------+
| 5 |
+-----------------+
1 row in set (0.00 sec)
mysql> SELECT CHAR_LENGTH('Café');
+----------------------+
| CHAR_LENGTH('Café') |
+----------------------+
| 4 |
+----------------------+
1 row in set (0.00 sec)
There might be some more wording and formatting things that need to be done.
I will follow the documentation rule. docs/functions-and-operators/string-functions.md Lines 33 to 41 in 611cdde
https://github.com/pingcap/docs/blob/611cddeb452ec2a652b1a644e36079fa6e1253a4/functions-and-operators/precision-math.md#rounding-behavior
thanks, OK, I will add for this |
Co-authored-by: Daniël van Eeden <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Co-authored-by: xixirangrang <[email protected]>
Co-authored-by: xixirangrang <[email protected]>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiancai The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-verify |
First-time contributors' checklist
What is changed, added or deleted? (Required)
Fix #15491
This PR adds instructions for the LEFT() and LENGTH function. (one of the doc dash issues)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?