-
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
functions-and-operators: enrich instructions for string functions CHAR_LENGTH() and CHARACTER_LENGTH #15483 #16057
functions-and-operators: enrich instructions for string functions CHAR_LENGTH() and CHARACTER_LENGTH #15483 #16057
Conversation
Welcome @PitifulPete! |
| CustomerName|LengthOfName | | ||
|-------------|--------------| | ||
| Albert Einstein | 15 | | ||
| Robert Oppenheimer | 18 | |
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.
Maybe include a name where CHAR_LENGTH()
and LENGTH()
don't match:
mysql> WITH n AS (
-> SELECT 'François Englert' AS p
-> UNION ALL SELECT 'Albert Einstein'
-> UNION ALL SELECT 'Robert Oppenheimer'
-> )
-> SELECT p, CHAR_LENGTH(p), LENGTH(p) FROM n;
+--------------------+----------------+-----------+
| p | CHAR_LENGTH(p) | LENGTH(p) |
+--------------------+----------------+-----------+
| François Englert | 16 | 17 |
| Albert Einstein | 15 | 15 |
| Robert Oppenheimer | 18 | 18 |
+--------------------+----------------+-----------+
3 rows in set (0.00 sec)
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.
I think this should be introduced in the LENGTH()
subheading where the difference between LENGTH()
and CHAR_LENGTH()
will be stated and this type of example will be included. Adding it here when LENGTH()
is yet to be introduced to the readers can confuse.
Note that this PR might have some relation and/or overlap with #16068 |
From the linter:
|
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.
Others LGTM
@yibin87: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@qiancai, could you merge commits unrelated to this issue with their respective branches? |
I think it might be good to do an interactive rebase to pick the right commits.
The rebase should look like this: For each line you can:
See also https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History Once you save and exit the editor there might be conflicts. If this is the case then edit the file to fix the conflict and use
Once the rebase is done you would have to do a |
6c2831d
to
15eb281
Compare
…R_LENGTH() and CHARACTER_LENGTH() improve content on string functions
Implemented corrections suggested by @dveeden and responded to one comment Co-authored-by: Daniël van Eeden <[email protected]>
Co-authored-by: Grace Cai <[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
@yibin87: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Co-authored-by: xixirangrang <[email protected]>
/retest |
/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 |
What is changed, added or deleted? (Required)
CHAR_LENGTH()
andCHARACTER_LENGTH()
functionsCHAR_LENGTH()
worksCHAR_LENGTH()
example to indicate that the example operates under the assumption that a SQL database existWhich 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)?
pingcap/tiflow#10197
pingcap/tiflow#10307
Do your changes match any of the following descriptions?